large ufs2 partitions and 'df'

User Joerg joerg at britannica.bec.de
Tue May 13 07:08:42 PDT 2003


On Mon, May 12, 2003 at 07:53:49AM -0700, Terry Lambert wrote:
> If you're going to change the structure, please put a version
> number as the first field, so that it's never a problem again.
> 
[...]

Why don't you do it the other way around? In my understanding
the problem is kernel <-> user mode compatibility. If the syscall
itself takes the version number, the kernel has the following
possibilities:
- it's the native struct stat -> perfect
- it's a supported older version -> convert / fill only needed fields
- otherwise, return EINVAL or similar

If you now add a special version number 0 to query the stat version
of the kernel, you can add a user level conversion function to
catch those EINVAL cases. This would be necessary for cases like
new userland and old kernel. This function might be loaded via dlopen.

You might even drop the kernel support for old versions and just
provide that special shared object especially for statically
compiled apps.

Just my 2 cent.

-- Joerg

> 
> -- Terry


More information about the freebsd-current mailing list