FreeBSD/src 1c4ca77 (r340431)lib/libc/sys getdirentries.2, share/man/man5 dir.5

Add d_off support for multiple filesystems.

The d_off field has been added to the dirent structure recently.
Currently filesystems don't support this feature.  Support has been
added and tested for zfs, ufs, ext2fs, fdescfs, msdosfs and unionfs.
A stub implementation is available for cd9660, nandfs, udf and
pseudofs but hasn't been tested.

Motivation for this feature: our usecase is for a userspace nfs server
(nfs-ganesha) with zfs.  At the moment we cache direntry offsets by
calling lseek once per entry, with this patch we can get the offset
directly from getdirentries(2) calls which provides a significant
speedup.

Submitted by:   Jack Halford <jack at gandi.net>
Reviewed by:    mckusick, pfg, rmacklem (previous versions)
Sponsored by:   Gandi.net
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D17917
DeltaFile
+16-2lib/libc/sys/getdirentries.2
+7-2sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
+4-0sys/fs/msdosfs/msdosfs_vnops.c
+2-2share/man/man5/dir.5
+3-0sys/fs/udf/udf_vnops.c
+2-0sys/fs/fdescfs/fdesc_vnops.c
+2-0sys/fs/nandfs/nandfs_vnops.c
+2-0sys/fs/pseudofs/pseudofs_vnops.c
+2-0sys/ufs/ufs/ufs_vnops.c
+2-0sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c
+2-0sys/fs/cd9660/cd9660_vnops.c
+2-0sys/fs/devfs/devfs_vnops.c
+2-0sys/fs/ext2fs/ext2_lookup.c
+48-613 files

UnifiedSplitRaw