freebsd-dev/sys/fs/devfs
Konstantin Belousov 1c4ca77890 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@gandi.net>
Reviewed by:	mckusick, pfg, rmacklem (previous versions)
Sponsored by:	Gandi.net
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D17917
2018-11-14 14:18:35 +00:00
..
devfs_devs.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
devfs_dir.c r326394 is calling malloc with M_WAITOK under a lock, revert for now 2017-11-30 14:06:54 +00:00
devfs_int.h sys/fs: further adoption of SPDX licensing ID tags. 2017-11-27 15:15:37 +00:00
devfs_rule.c sys/fs: further adoption of SPDX licensing ID tags. 2017-11-27 15:15:37 +00:00
devfs_vfsops.c Make it easier for filesystems to count themselves as jail-enabled, 2018-05-04 20:54:27 +00:00
devfs_vnops.c Add d_off support for multiple filesystems. 2018-11-14 14:18:35 +00:00
devfs.h sys/fs: further adoption of SPDX licensing ID tags. 2017-11-27 15:15:37 +00:00