Thanks Nathan and Eric. Roger to Eric's point re: holes smaller than
the filesystem blocksize (I suppose I could lseek past a small chunk
while writing, it just wouldn't be a hole, right?)
I presume that my hole must not just be a multiple of the filesystem
blocksize -- it should also be blocksize-aligned. A single-block chunk
that I lseek past while writing would be two sub-blocksize null sections
(but not a hole) unless it's blocksize-aligned. Right?
Thanks again!
John
Nathan Scott wrote:
>Hi John,
>
>On Wed, Jun 14, 2006 at 01:55:27PM -0500, John Groves wrote:
>
>
>>A question for those who know more about xfs internals than me:
>>
>>If want to create sparse files that XFS can handle efficiently, is there
>>an optimal minimum sparse chunk size? I can look at an data stream for
>>null segments and make them sparse, but I presume I shouldn't make 1
>>byte sparse extents. File size will range from small to multiple GB,
>>but large files are the norm.
>>
>>
>
>I'd recommend you make your minimum sparse chunk be the filesystem
>blocksize. You can extract this from the statfs(2) f_bsize field.
>
>cheers.
>
>
>
[[HTML alternate version deleted]]
|