diff options
author | Amir Goldstein <amir73il@gmail.com> | 2021-10-24 14:01:23 +0300 |
---|---|---|
committer | Amir Goldstein <amir73il@gmail.com> | 2022-01-03 14:55:34 +0200 |
commit | 1b498ac9b341e086562f54cc49bf035e19a94e1d (patch) | |
tree | 51745ff21733bd4a3dc3328df272f57404b60f4b /lib | |
parent | 48ae2e72b39b6a31cb2194f6f11786b7ca06aac6 (diff) | |
download | libfuse-1b498ac9b341e086562f54cc49bf035e19a94e1d.tar.gz |
Add support for FOPEN_NOFLUSH flag
Allow requesting from kernel to avoid flush on close at file open
time. If kernel does not support FOPEN_NOFLUSH flag, the request
will be ignored.
For passthrough_hp example, request to avoid flush on close when
writeback cache is disabled and file is opened O_RDONLY.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/fuse_lowlevel.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c index d227688..b5638fc 100644 --- a/lib/fuse_lowlevel.c +++ b/lib/fuse_lowlevel.c @@ -395,6 +395,8 @@ static void fill_open(struct fuse_open_out *arg, arg->open_flags |= FOPEN_CACHE_DIR; if (f->nonseekable) arg->open_flags |= FOPEN_NONSEEKABLE; + if (f->noflush) + arg->open_flags |= FOPEN_NOFLUSH; } int fuse_reply_entry(fuse_req_t req, const struct fuse_entry_param *e) |