]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
An intermittent problem with NFSv4 exporting of ZFS snapshots was
authorrmacklem <rmacklem@FreeBSD.org>
Tue, 24 Dec 2013 22:24:17 +0000 (22:24 +0000)
committerrmacklem <rmacklem@FreeBSD.org>
Tue, 24 Dec 2013 22:24:17 +0000 (22:24 +0000)
commit1889cef2a5639c665b57a56fd7532f99cda81ace
treec79a388e973a44f073d63b536b54832a782bdc5e
parent67082dae0c8999e192bc96c70dc60010a62e2398
An intermittent problem with NFSv4 exporting of ZFS snapshots was
reported to the freebsd-fs mailing list. I believe the problem was
caused by the Readdir operation using VFS_VGET() for a snapshot file entry
instead of VOP_LOOKUP(). This would not occur for NFSv3, since it
will do a VFS_VGET() of "." which fails with ENOTSUPP at the beginning
of the directory, whereas NFSv4 does not check "." or "..". This
patch adds a call to VFS_VGET() for the directory being read to check
for ENOTSUPP.
I also observed that the mount_on_fileid and fsid attributes were
not correct at the snapshot's auto mountpoints when looking at packet
traces for the Readdir. This patch fixes the attributes by doing a check
for different v_mount structure, even if the vnode v_mountedhere is not
set.

Reported by: jas@cse.yorku.ca
Tested by: jas@cse.yorku.ca
Reviewed by: asomers
MFC after: 1 week
sys/fs/nfsserver/nfs_nfsdport.c