RFC: patch to make d_fileno 64bits

Konstantin Belousov kostikbel at gmail.com
Sat Nov 22 18:44:11 UTC 2014

On Sat, Nov 22, 2014 at 10:12:54AM -0800, Kirk McKusick wrote:
> > Date: Sat, 22 Nov 2014 19:55:31 +0200
> > From: Konstantin Belousov <kostikbel at gmail.com>
> > To: Kirk McKusick <mckusick at mckusick.com>
> > Cc: Rick Macklem <rmacklem at uoguelph.ca>,
> >         FreeBSD Filesystems <freebsd-fs at freebsd.org>
> > Subject: Re: RFC: patch to make d_fileno 64bits
> > 
> >> Do we have a way of versioning libc so that we can have the old version
> >> that provides the 32-bit version of the syscalls (156 and 196) along
> >> with 32-bit higher-level functions like fts and friends and then a new
> >> libc version that has the 64-bit version of the syscalls and other
> >> higher-level functions?
> > 
> > We do not need several versions of libc. We support symbol versioning,
> > i.e. we can have old getdirents symbol which resolves to syscall stub
> > for 196, and new getdirents for new syscall.
> > 
> > It is somewhat convoluted feature, you could look at example in
> > sys/kern/sysv_*.c, for instance, freebsd7_shmctl and shmctl. Also
> > look at libc/include/compat.h.  For pure usermode compat shims,
> > lib/libc/gen/fts-compat.c was already handled one time.
> > 
> > I promise to write neccessary magic for libc versioning when needed.
> > As I explained before, unfortunately the libc is not the final point
> > for the userspace compat.
> What more beyond libc do we need to handle? Things like fts is in libc.
> Are there other libraries besides libc that embed the size of an ino_t?

Answering the question is part of the project.

Scientific method to look at this is to do two builds of the world with
the debugging information enabled, one stock, and one with the ino_t
changed to 64bit. Then, tools like abi-compliance-checker or some set
of scripts we have somewhere in tree (I do not remember exactly), can
compare the dwarf definitions of the structures.  This will provide the
definitive answer to the question.

General feeling is that a lot should be affected, since struct stat
includes inode number.  Quick look at the sources picks up references
to ino_t in libarchive, libprocstat, libufs external interfaces.

More information about the freebsd-fs mailing list