From 97991a65699cdb1a2f90fb42c3a3a6dfadbde0be Mon Sep 17 00:00:00 2001 From: Bernd Schubert Date: Thu, 12 Sep 2024 16:30:43 +0200 Subject: [PATCH] example/passthrough_hp: Set keep_cache and noflush in sfs_create These flags should be also set for O_CREAT --- example/passthrough_hp.cc | 5 +++-- 1 file 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 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); -- 2.30.2