[lsb-discuss] Adding statfs interfaces
Wichmann, Mats D
mats.d.wichmann at intel.com
Fri Dec 15 14:33:23 PST 2006
>> It appears the whole point of the requested fstatfs
>> interface is to be able to determine the file system
>> type on which a given file resides.
>Are we sure that's why people are requesting statfs/fstatfs? I would
>have assumed it's because application progams want to know how much
>free space and perhaps free inodes are available in a particular
>filesystem. Most application shouldn't need to know the underlying
>filesystem type of a particular file or directory --- but many might
>want to know free space information.
Yes, in this case we do know that.
statfs was deprecated in 1.3, and removed in 2.0, in favor
of the POSIX-standard statvfs interfaces, which give all
the information you mention. What was missed (or we thought
it wasn't a big deal), is that there's one bit of information
statvfs doesn't give you that seems to be important - the
file system type. Several people have told us quite vocally
that they need to know this so that they know that expected
locking operations and perhaps some others like synchronous
writes may not behave the same on certain foreign filesystem
types as on native linux filesystems, and that the apps
actually need to know this.
So, reluctantly, it looks like they need to go back in.
statvfs isn't affected and I'd still consider it the
preferred interface for filesystem information.
More information about the lsb-discuss