xfs
[Top] [All Lists]

Re: XFS and "hole".

To: linux-xfs@xxxxxxxxxxx
Subject: Re: XFS and "hole".
From: Bernhard Erdmann <be@xxxxxxxxxxx>
Date: Sat, 01 Jan 2005 13:03:09 +0100
In-reply-to: <20041228154515.04AA618776@xxxxxxxxxxxxx>
References: <20041228154515.04AA618776@xxxxxxxxxxxxx>
Sender: linux-xfs-bounce@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041020
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!

"There is no requirement to detect blocks of zeroes being written in order to replace them with holes (nor is it forbidden)."


see http://oss.sgi.com/~sandeen/design/arch.pdf

2.2.1 File System Requirements

2.2.1.1 File system functionality
[...]
Efficient support for sparse files. Arbitrary holes must be supported, areas of the file which have never been written and which read back as zeroes. The representation must be disk-space efficient as well as cpu-time efficient in retrieval of old data and insertion of new data. There is no requirement to detect blocks of zeroes being written in order to replace them with holes (nor is it forbidden). This capability is important for some scientific and compute-intensive applications, as well as for Hierarchical Storage Management (HSM).


<Prev in Thread] Current Thread [Next in Thread>
  • Re: XFS and "hole"., Bernhard Erdmann <=