The fusefs_checkexp() function returns 0, indicating that export via NFS
is allowed, while in fact fusefs doesn't support NFS at all. (There is
a vfs_export() call missing in fusefs_mount() and maybe other stuff too.)
Furthermore, it does so without setting *extflagsp and *credanonp, which
results in an uvm fault when trying to NFS mount a directory of a fusefs
file system.
tmpfs and udf also dont't support NFS, returning EOPNOTSUPP and EACCESS
respectively. In my opinion EOPNOTSUPP is preferrable, because it can be
parsed as "this filesystem doesn't support NFS".
Any comments?
Index: miscfs/fuse/fuse_vfsops.c
===================================================================
RCS file: /cvs/src/sys/miscfs/fuse/fuse_vfsops.c,v
retrieving revision 1.16
diff -u -p -r1.16 fuse_vfsops.c
--- miscfs/fuse/fuse_vfsops.c 19 Jul 2015 14:21:14 -0000 1.16
+++ miscfs/fuse/fuse_vfsops.c 16 Feb 2016 09:02:40 -0000
@@ -363,5 +363,5 @@ int
fusefs_checkexp(struct mount *mp, struct mbuf *nam, int *extflagsp,
struct ucred **credanonp)
{
- return (0);
+ return (EOPNOTSUPP);
}
natano