xfs
[Top] [All Lists]

Re: XFS and "hole".

To: Vadim <vadimv@xxxxxx>
Subject: Re: XFS and "hole".
From: Russell Cattelan <cattelan@xxxxxxx>
Date: Wed, 29 Dec 2004 11:05:04 -0600
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: <20041228154515.04AA618776@xxxxxxxxxxxxx>
References: <20041228154515.04AA618776@xxxxxxxxxxxxx>
Sender: linux-xfs-bounce@xxxxxxxxxxx
User-agent: Mozilla Thunderbird 0.9 (Macintosh/20041103)
Vadim wrote:

XFS supports "holes". But we created file 100mb with 0  only in it, and it's actual size 
was 100mb, for zeros this support doesn't work. We created other file wrote some bytes at the 
beggining then did seek ~1GB and wrote to the end couple more bytes. XFS was showing it's size of 
1GB, but actual size of it on the disc was only few bytes, that's called "HOLE" as I 
understand. But it doesn't work for 0s, if you write a big ammount of zeros. What we have to do, to 
write an add-on that would work for zeros, but problemm is we can't find any good enough 
specification. We could dig over whole source that was being written several years, and VERY badly 
documentated, but we are limited in time... If anybody could help with specification or give an 
advice, we would really apretiate it!

Thank you.
Vadim Vohmjanin.

-----------------------------------------
ITV - Sinu lemmiksaated internetis!
http://www.itv.ee

The filesystem does do any sort of: is this block all 0's so I'll skip writting it and create a hole. That would be a large amount of overhead as the content of every block would have to be scanned
before written to disk to make that determination.

Holes are created by seeking around a file a writing a few bytes wherever you happen to
be.

Basically it is up to the app do determine it a set of data is just 0's and skip the write.


-Russell Cattelan


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