This should stop some more xfstest test failures.
/* This is a local file system - no network coherency needed */
fuse_set_feature_flag(conn, FUSE_CAP_DIRECT_IO_ALLOW_MMAP);
+ /* Disable NFS export support, which also disabled name_to_handle_at.
+ * Goal is to make xfstests that test name_to_handle_at to fail with
+ * the right error code (EOPNOTSUPP) than to open_by_handle_at to fail with
+ * ESTALE and let those test fail.
+ * Perfect NFS export support is not possible with this FUSE filesystem needs
+ * more kernel work, in order to passthrough nfs handle encode/decode to
+ * fuse-server/daemon.
+ */
+ fuse_set_feature_flag(conn, FUSE_CAP_NO_EXPORT_SUPPORT);
+
/* Disable the receiving and processing of FUSE_INTERRUPT requests */
conn->no_interrupt = 1;
}
if(conn->capable & FUSE_CAP_HANDLE_KILLPRIV_V2)
printf("\tFUSE_CAP_HANDLE_KILLPRIV_V2\n");
if(conn->capable & FUSE_CAP_DIRECT_IO_ALLOW_MMAP)
- printf("\tFUSE_CAP_DIRECT_IO_ALLOW_MMAP\n");
+ printf("\tFUSE_CAP_DIRECT_IO_ALLOW_MMAP\n");
+ if (conn->capable & FUSE_CAP_NO_EXPORT_SUPPORT)
+ printf("\tFUSE_CAP_NO_EXPORT_SUPPORT\n");
fuse_session_exit(se);
}
*/
#define FUSE_CAP_PASSTHROUGH (1 << 29)
+/**
+ * Indicates that the file system cannot handle NFS export
+ *
+ * If this flag is set NFS export and name_to_handle_at
+ * is not going to work at all and will fail with EOPNOTSUPP.
+ */
+#define FUSE_CAP_NO_EXPORT_SUPPORT (1 << 30)
+
/**
* Ioctl flags
*
se->conn.capable |= FUSE_CAP_EXPIRE_ONLY;
if (inargflags & FUSE_PASSTHROUGH)
se->conn.capable |= FUSE_CAP_PASSTHROUGH;
+ if (inargflags & FUSE_NO_EXPORT_SUPPORT)
+ se->conn.capable |= FUSE_CAP_NO_EXPORT_SUPPORT;
} else {
se->conn.max_readahead = 0;
}
*/
outarg.max_stack_depth = se->conn.max_backing_stack_depth + 1;
}
+ if (se->conn.want & FUSE_CAP_NO_EXPORT_SUPPORT)
+ outargflags |= FUSE_NO_EXPORT_SUPPORT;
if (inargflags & FUSE_INIT_EXT) {
outargflags |= FUSE_INIT_EXT;