Hi,
A while back I was talking about adding preallocation support to
ferris. I didn't get around to adding it at the time, though the
doco seems much better now and I have an application which would
be greatly enhanced using it.
I have found the calls in xfs(5)
XFS_IOC_FSGETXATTR
XFS_IOC_RESVSP64
XFS_IOC_UNRESVSP64
I am thinking of adding an interface though Ferris using both
Ferris' support for arbitrary creation arguments
(see http://witme.sourceforge.net/ferriscreate.paper2001/ )
and also creating a "fake" EA for preallocation-eof
which can be set to whatever size is wanted in the preallocation.
The main question I have here is how to obtain the current
amount of space that is preallocated in the file and not used.
It seems from RTFM that XFS_IOC_FSGETXATTR only tells if
preallocation is being used. If I can tell how much space
a file has preallocated at eof then I can add a new EA and
edit it with the client shown here:
http://witme.sourceforge.net/libferris.web/Ego-Jan-2002-1.png
This would allow a nice interface for preallocation and make
scripting easy to be able to check for files that have been
written but are smaller than the space originally preallocated
to them.
Thoughts?
--
-----------------------------------------------------
http://witme.sourceforge.net/libferris.web/index.html
|