[lsb-discuss] statfs specification addition: review

Theodore Tso tytso at mit.edu
Thu Dec 21 08:56:01 PST 2006

Well, let's see how much support we get from the kernel development
community, first.  People very strongly dislike magic numbers, and the
current one clearly doesn't work (because there are no guarantees of
uniqueness and ext2/3/4 already share the same magic number).  If we
use a magic number, then it will have to be a new one, and people will
have to register it to avoid conflicts, and I'm pretty sure I know
what response that will get from Linus (BZZT!).  

On the other hand, if we use a character string, we don't have a lot
of extra space available in the interface as defined by the current
set of fsystem calls --- which is DIFFERENT from the structures used
by (f)statvfs(64) or (f)statfs(64).  

My current thinking is to propose using an 8 byte fixed length string
(which uses up 2 out of the 5 available 32-bit spare fields in the
kernel statfs structure), with a registry in
/usr/src/linux/Documentation to avoid collisions, and see if we can
get consensus on LKML around that.

Once we get this into the kernel, then the next step will get glibc to
change (f)statvfs(64) to use one of its spare fields to send back the
8 byte fixed character string.  And then of course, the 12-18 month
wait until the distributions pick up the changes from glibc.

I'm willing to take on the task of writing up the necessary kernel
patch and trying to shepherd them through LKML, if we have consensus
that this will solve the problem in the best possible way.  (If we had
the space, I'd love to be able to enhance statvfs() also pass back the
label and uuid information, but unfortunately, that doesn't seem to be
very likely without the creation of two new system calls and a lot of
backwards compatibility gorp.  Since that's not LSB-related, folks who
want that should contact me off-line, and try to convince me that's
going to be worth the work; we may be better off simply standardizing
the blkid library interfaces instead.)

Comments, thoughts?

						- Ted

More information about the lsb-discuss mailing list