if you still really want to do this (note that this sort of
data-scanning would be an odd feature, and is not a "fix" for hole
support in xfs, which is not broken...) then you can look at
http://oss.sgi.com/~sandeen/design/ for more info on how xfs works.
these docs should be linked off the xfs pages, but the .htaccess is foo
- russell can you fix this please?
Russell Cattelan 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!
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
ITV - Sinu lemmiksaated internetis!
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
Basically it is up to the app do determine it a set of data is just 0's
and skip the write.