[RFCv2] erofs-utils:code for detecting and tracking holes in uncompressed sparse files.

Gao Xiang gaoxiang25 at huawei.com
Tue Dec 24 21:05:11 AEDT 2019


Hi Pratik,

On Tue, Dec 24, 2019 at 03:05:53PM +0530, Pratik Shinde wrote:
> Hello Gao,
> 
> Thanks for the review.
> If I understand correctly , you wish to keep track of every extent assigned
> to the file.
> in case of file without any holes in it, there will single extent
> representing the entire file.
> 
> Also, the current block no. lookup happens in constant time. (since we only
> record the start blk no.)
> If we use extent record for finding given block no. it can't be done in
> constant time correct ? (maybe in LogN)


Could I ask a question?
In short, how can we use the proposal approach to read random blocks
in constant time O(1)?

e.g.
 if you have two holes 2...4  7...10 in a file with 12 blocks.

 if we want to random access block 11, only block number 1,5,6,11 were
 saved one by one (maybe p1,p2,p3,p4).

 How can we get the physical address (p4) of block 11 directly without
 scanning the previous holes?

Thanks,
Gao Xiang


> 
> I think I don't fully understand reason for recording extents assigned to a
> file.Since the current design
> is already time and space optimized & there are no deletions happening.
> Is it for some future requirement ?
> 
> --Pratik.



More information about the Linux-erofs mailing list