aboutsummaryrefslogtreecommitdiffstats
path: root/example
diff options
context:
space:
mode:
authorBernd Schubert <bschubert@ddn.com>2024-09-19 15:09:04 +0200
committerBernd Schubert <bernd.schubert@fastmail.fm>2024-11-13 16:43:59 +0100
commite2eb1abb105aa52e25fbf8973595ed2b6c64416d (patch)
treebb4acce29b8cbc3c5f08789c22a086d7c72e8fe4 /example
parent15f5c811239abca80eda2d988be7a9a9848f7c10 (diff)
downloadlibfuse-e2eb1abb105aa52e25fbf8973595ed2b6c64416d.tar.gz
Add FUSE_CAP_NO_EXPORT and use it in passthrough_hp
This should stop some more xfstest test failures.
Diffstat (limited to 'example')
-rw-r--r--example/passthrough_hp.cc10
-rw-r--r--example/printcap.c4
2 files changed, 13 insertions, 1 deletions
diff --git a/example/passthrough_hp.cc b/example/passthrough_hp.cc
index 1f6647f..c393f04 100644
--- a/example/passthrough_hp.cc
+++ b/example/passthrough_hp.cc
@@ -214,6 +214,16 @@ static void sfs_init(void *userdata, fuse_conn_info *conn) {
/* 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;
}
diff --git a/example/printcap.c b/example/printcap.c
index bbbc1b8..01b4d3f 100644
--- a/example/printcap.c
+++ b/example/printcap.c
@@ -88,7 +88,9 @@ static void pc_init(void *userdata,
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);
}