aboutsummaryrefslogtreecommitdiffstats
path: root/example/passthrough_ll.c
diff options
context:
space:
mode:
authorBernd Schubert <bschubert@ddn.com>2023-10-10 13:18:36 +0200
committerNikolaus Rath <Nikolaus@rath.org>2023-10-11 08:39:11 +0100
commit063ef8e03ff669579d3a441bece702283b7654e3 (patch)
tree7dc4b2ba6bae6e4c4de91f16a1e327bfdc901ff0 /example/passthrough_ll.c
parentef11cf9eace3cf5f529a23899ae850c09aaf64bc (diff)
downloadlibfuse-063ef8e03ff669579d3a441bece702283b7654e3.tar.gz
Enabled parallel direct IO writes for passthrough examples
All these passthrough examples don't need writes to be serialized. Actually, most file systems probably handle non serialized parallel direct writes - the FOPEN_PARALLEL_DIRECT_WRITES flag is just to avoid a regression for those file system that rely on serialized DIO writes in fuse kernel. Passthrough file system forward the IO to another file system, which actually handles that internally - serialized in fuser kernel is not needed.
Diffstat (limited to 'example/passthrough_ll.c')
-rw-r--r--example/passthrough_ll.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/example/passthrough_ll.c b/example/passthrough_ll.c
index 070cef1..afac6ea 100644
--- a/example/passthrough_ll.c
+++ b/example/passthrough_ll.c
@@ -775,6 +775,8 @@ static void lo_create(fuse_req_t req, fuse_ino_t parent, const char *name,
else if (lo->cache == CACHE_ALWAYS)
fi->keep_cache = 1;
+ fi->parallel_direct_writes = 1;
+
err = lo_do_lookup(req, parent, name, &e);
if (err)
fuse_reply_err(req, err);
@@ -831,6 +833,9 @@ static void lo_open(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi)
fi->direct_io = 1;
else if (lo->cache == CACHE_ALWAYS)
fi->keep_cache = 1;
+
+ fi->parallel_direct_writes = 1;
+
fuse_reply_open(req, fi);
}