This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Linux Extended-stat system call


Hi,

I'm in the throes of creating an extended-stat system call that:

 (1) Is available in exactly the same form across all arches.

 (2) Expands various fields, most notably timestamps and file size.

 (3) Allows Linux to return extra data to the user - such as the
     creation/birthtime of a file.

 (4) Provides spare space for future expansion without the need to add further
     stat syscalls.

 (5) Provides indicators of what information is actually retrieved (for
     instance, did we actually get given a UID and GID, or were these made
     up, ...).

 (6) Provides information about a file and the VFS's view of it (for instance,
     is the file kernel-API - such as in /proc, is it encrypted, ...).

The code I have currently can be found here:

	http://git.kernel.org/cgit/linux/kernel/git/dhowells/linux-fs.git/log/?h=xstat

It has been published on various kernel mailing lists for discussion.

One thing I would like to do is make it so that stat() can use it with minimal
effort.  Now, I appreciate that struct statx contains a lot more than can be
fitted into struct stat, so making it compatible might not be possible.
However, correctly arranging the fields in struct statx might simplify the job
of translating to glibc's idea of statx (ie. make it possible with just a
memcpy()).  Further, I note that there is some spare space in glibc's struct
stat - is that reserved for anything in particular (such as creation time)?

Any comments would be appreciated.

Thanks,
David


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]