freebsd-nq/sys/fs
Bryan Drewery 4fc0f18c20 Change NFS readdir() to only ignore cookies preceding the given offset for
UFS rather than for all but ZFS.  This code was assuming that offsets were
monotonically increasing for all file systems except ZFS and that the
cookies from a previous call may have been rewound to a block boundary.
According to mckusick@ only UFS is known to do this, so only requests against
UFS file systems should remove cookies smaller than the given offset.  This
fixes serving TMPFS over NFS as it too does not have monotonically increasing
offsets.  The comment around the code also indicated it was specific to UFS.

Some of the code using 'not_zfs' is specific to ZFS snapshot handling, so
add a 'is_zfs' variable for those cases.

It's possible that 'is_zfs' check for VFS_VGET() support may not be
specific to ZFS.  This needs more research and testing.

After this fix TMPFS and other file systems can be served over NFS.

To test I compared the results of syncing a /usr/src tree into a tmpfs and
serving that over NFS.  Before the fix 3589 files were missing on the remote
view.  After the fix all files were successfully found.

Reviewed by:	rmacklem
Discussed with:	mckusick, rmacklem via fs@
Discussed at:	http://lists.freebsd.org/pipermail/freebsd-fs/2014-April/019264.html
MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
2014-07-01 20:00:35 +00:00
..
cd9660
cuse Use existing PHOLD() and PRELE() macros. 2014-06-24 18:25:43 +00:00
deadfs
devfs In msdosfs_setattr(), add a check for result of the utimes(2) 2014-06-17 07:11:00 +00:00
ext2fs Revert r263449; 2014-03-21 04:33:38 +00:00
fdescfs Update kernel inclusions of capability.h to use capsicum.h instead; some 2014-03-16 10:55:57 +00:00
fifofs Ignore the error from pipespace_new when creating a pipe. 2014-05-02 00:52:13 +00:00
fuse Update kernel inclusions of capability.h to use capsicum.h instead; some 2014-03-16 10:55:57 +00:00
msdosfs In msdosfs_setattr(), add a check for result of the utimes(2) 2014-06-17 07:11:00 +00:00
nandfs Take out the hack to write -1's to non-NAND. Always do a BIO_DELETE on 2014-04-18 17:03:43 +00:00
nfs The new draft specification for NFSv4.0 specifies that a server 2014-05-03 00:13:45 +00:00
nfsclient There might be a potential race condition for the NFSv4 client 2014-06-28 21:47:15 +00:00
nfsserver Change NFS readdir() to only ignore cookies preceding the given offset for 2014-07-01 20:00:35 +00:00
nullfs
procfs
pseudofs
smbfs Use SMB_QUERY_FS_SIZE_INFO request to populate statfs structure. 2014-04-15 09:10:01 +00:00
tmpfs In msdosfs_setattr(), add a check for result of the utimes(2) 2014-06-17 07:11:00 +00:00
udf
unionfs