]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
fusefs: require FUSE_NO_OPENDIR_SUPPORT for NFS exporting
authorAlan Somers <asomers@FreeBSD.org>
Mon, 3 Jan 2022 00:16:09 +0000 (17:16 -0700)
committerAlan Somers <asomers@FreeBSD.org>
Fri, 4 Feb 2022 23:31:05 +0000 (16:31 -0700)
commit00134a07898fa807b8a1fcb2596f0e3644143f69
treee028ef523eb46df53401c4e028567c2daca05b6d
parent4a6526d84a56f398732bff491e63aa42f796a27d
fusefs: require FUSE_NO_OPENDIR_SUPPORT for NFS exporting

FUSE file systems that do not set FUSE_NO_OPENDIR_SUPPORT do not
guarantee that d_off will be valid after closing and reopening a
directory.  That conflicts with NFS's statelessness, that results in
unresolvable bugs when NFS reads large directories, if:

* The file system _does_ change the d_off field for the last directory
  entry previously returned by VOP_READDIR, or
* The file system deletes the last directory entry previously seen by
  NFS.

Rather than doing a poor job of exporting such file systems, it's better
just to refuse.

Even though this is technically a breaking change, 13.0-RELEASE's
NFS-FUSE support was bad enough that an MFC should be allowed.

MFC after: 3 weeks.
Reviewed by: rmacklem
Differential Revision: https://reviews.freebsd.org/D33726
sys/fs/fuse/fuse_internal.c
sys/fs/fuse/fuse_internal.h
sys/fs/fuse/fuse_vnops.c