xfs
[Top] [All Lists]

Re: Question about sparse files

To: linux-xfs@xxxxxxxxxxx
Subject: Re: Question about sparse files
From: John Groves <John@xxxxxxxxxxxxxx>
Date: Wed, 14 Jun 2006 19:58:07 -0500
In-reply-to: <20060615081403.B918399@wobbly.melbourne.sgi.com>
References: <44905B9F.5000401@GrovesTech.com> <20060615081403.B918399@wobbly.melbourne.sgi.com>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
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]]


<Prev in Thread] Current Thread [Next in Thread>