On Wed, 2012-03-14 at 14:27 +1100, Dave Chinner wrote: > On Sat, Mar 10, 2012 at 02:07:05PM -0600, Richard Laager wrote: > > If the answer to #2 is not C, it would appear there's no atomic way to > > indicate that I'm done with certain data* but I want the filesystem to > > continue to guarantee space for me. Is this correct? > > Not through fallocate() right now. XFS has an ioctl that will turn > written ranges and holes back into preallocated space: > XFS_IOC_ZERO_RANGE. Do filesystems generally track the data necessary to tell the difference between fallocate() + write() and just a regular write()? If so, it might be nice for applications to be able to say "I'm done with this data" and effectively "undo" the write(). In other words, the space would return to being unallocated or preallocated, whichever it was originally. I suspect they don't track preallocation of data ranges once they're filled with data. So, for example, QEMU will have to be told whether the administrator wants thin (i.e. use PUNCH_HOLE) or thick (i.e. use ZERO_RANGE) provisioning. -- Richard
Attachment:
signature.asc
Description: This is a digitally signed message part