RFC: patch to make d_fileno 64bits
rmacklem at uoguelph.ca
Fri Nov 21 23:11:32 UTC 2014
Gleb Kurtsou wrote:
> On (21/11/2014 10:25), John Baldwin wrote:
> > On Thursday, November 20, 2014 10:19:14 PM Rick Macklem wrote:
> > > The attached patch covers the basics of a way to
> > > convert the d_fileno field of "struct dirent" to
> > > 64bits. This patch is incomplete and won't even
> > > build, but I thought I'd post it in case anyone
> > > wanted to take a look and comment on the approach
> > > it uses.
> > >
> > > - renames the old/current one "struct dirent32"
> > > - changes d_fileno to 64bits and adds a 64bit
> > > d_off field for the offset of the underlying
> > > file system
> > > - defines a new VOP_READDIR() that will return
> > > the new "struct dirent" that is used as the
> > > default one for a new getdirentries(2).
> > > - the old/current getdirentries(2) uses the old
> > > VOP_READDIR32() by default.
> > >
> > > For the case of a file system that supports both
> > > the new and old VOP_READDIR(), they are used by
> > > the corresponding new and old getdirentries(2)
> > > syscalls.
> > >
> > > For a file system that only supports one of
> > > the VOP_READDIR()s, the "struct dirent32"
> > > is copied to "struct dirent" (or vice versa).
> > >
> > > At this point, all file systems would support
> > > the old VOP_READDIR() and I think the new
> > > VOP_READDIR() can easily be added for NFS,
> > > ZFS. (OpenBSD already has UFS code for
> > > essentially a new struct dirent and hopefully
> > > that code could be ported easily, too.)
> > >
> > > Anyhow, any comments on this approach? rick
> > I think this is already done (along with several other changes)
> > more fully in
> > the projects/ino64 branch in svn?
> projects/ino64 was created by mdf for merging GSoC commits, and it
> didn't even get half way through.
> I'm currently working on merging the code to CURRENT. It's been more
> than 2 years, so there is quite some work in there. I intend to
> the branch as soon as code is ready for review.
> Besides branch also changes dev_t to 64-bit, bumps MNAMELEN to 1024
> has complete ABI compatibility shims (probably except openaudit which
I was aware of Gleb's work and had pinged him to see if he could update
his patch. (I'll admit I wasn't aware of projects/ino64 until this morning.)
It was my understanding (which could be wrong) that the d_fileno field of
"struct dirent" was a tricky bit that hadn't yet been solved (I could be
wrong) and started there.
I am certainly hoping that Gleb can find the time to update projects/ino64.
(I will take a look at what is there now to see what was done w.r.t. d_fileno.)
> freebsd-fs at freebsd.org mailing list
> To unsubscribe, send any mail to "freebsd-fs-unsubscribe at freebsd.org"
More information about the freebsd-fs