diff options
author | Bernd Schubert <bschubert@ddn.com> | 2024-09-12 16:30:43 +0200 |
---|---|---|
committer | Bernd Schubert <bernd.schubert@fastmail.fm> | 2024-09-13 19:10:44 +0200 |
commit | 97991a65699cdb1a2f90fb42c3a3a6dfadbde0be (patch) | |
tree | 7cad79326f53803c695126323af921004bad35d5 /example/passthrough_hp.cc | |
parent | c00c9fd831ecbc17522271ba887f1c35ed61867c (diff) | |
download | libfuse-97991a65699cdb1a2f90fb42c3a3a6dfadbde0be.tar.gz |
example/passthrough_hp: Set keep_cache and noflush in sfs_create
These flags should be also set for O_CREAT
Diffstat (limited to 'example/passthrough_hp.cc')
-rw-r--r-- | example/passthrough_hp.cc | 5 |
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); |