diff options
author | Bernd Schubert <bschubert@ddn.com> | 2023-10-10 13:18:36 +0200 |
---|---|---|
committer | Nikolaus Rath <Nikolaus@rath.org> | 2023-10-11 08:39:11 +0100 |
commit | 063ef8e03ff669579d3a441bece702283b7654e3 (patch) | |
tree | 7dc4b2ba6bae6e4c4de91f16a1e327bfdc901ff0 /example/passthrough_hp.cc | |
parent | ef11cf9eace3cf5f529a23899ae850c09aaf64bc (diff) | |
download | libfuse-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_hp.cc')
-rw-r--r-- | example/passthrough_hp.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/example/passthrough_hp.cc b/example/passthrough_hp.cc index 9ee6fb1..1ee5352 100644 --- a/example/passthrough_hp.cc +++ b/example/passthrough_hp.cc @@ -836,6 +836,8 @@ static void sfs_create(fuse_req_t req, fuse_ino_t parent, const char *name, if (fs.direct_io) fi->direct_io = 1; + fi->parallel_direct_writes = 1; + Inode& inode = get_inode(e.ino); lock_guard<mutex> g {inode.m}; inode.nopen++; @@ -896,6 +898,8 @@ static void sfs_open(fuse_req_t req, fuse_ino_t ino, fuse_file_info *fi) { if (fs.direct_io) fi->direct_io = 1; + fi->parallel_direct_writes = 1; + fi->fh = fd; fuse_reply_open(req, fi); } |