aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernd Schubert <bschubert@ddn.com>2024-09-12 16:30:43 +0200
committerBernd Schubert <bernd.schubert@fastmail.fm>2024-09-13 19:10:44 +0200
commit97991a65699cdb1a2f90fb42c3a3a6dfadbde0be (patch)
tree7cad79326f53803c695126323af921004bad35d5
parentc00c9fd831ecbc17522271ba887f1c35ed61867c (diff)
downloadlibfuse-97991a65699cdb1a2f90fb42c3a3a6dfadbde0be.tar.gz
example/passthrough_hp: Set keep_cache and noflush in sfs_create
These flags should be also set for O_CREAT
-rw-r--r--example/passthrough_hp.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/example/passthrough_hp.cc b/example/passthrough_hp.cc
index 4f0dd5e..26e3644 100644
--- a/example/passthrough_hp.cc
+++ b/example/passthrough_hp.cc
@@ -871,6 +871,9 @@ static void sfs_create_open_flags(fuse_file_info *fi)
To make parallel_direct_writes valid, need set fi->direct_io
in current function. */
fi->parallel_direct_writes = 1;
+
+ fi->keep_cache = (fs.timeout != 0);
+ fi->noflush = (fs.timeout == 0 && (fi->flags & O_ACCMODE) == O_RDONLY);
}
static void sfs_create(fuse_req_t req, fuse_ino_t parent, const char *name,
@@ -956,8 +959,6 @@ static void sfs_open(fuse_req_t req, fuse_ino_t ino, fuse_file_info *fi) {
lock_guard<mutex> g {inode.m};
inode.nopen++;
- fi->keep_cache = (fs.timeout != 0);
- fi->noflush = (fs.timeout == 0 && (fi->flags & O_ACCMODE) == O_RDONLY);
sfs_create_open_flags(fi);