From 1b498ac9b341e086562f54cc49bf035e19a94e1d Mon Sep 17 00:00:00 2001 From: Amir Goldstein Date: Sun, 24 Oct 2021 14:01:23 +0300 Subject: 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 --- include/fuse_common.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include/fuse_common.h') diff --git a/include/fuse_common.h b/include/fuse_common.h index ea4bdb0..d7481be 100644 --- a/include/fuse_common.h +++ b/include/fuse_common.h @@ -83,8 +83,12 @@ struct fuse_file_info { nothing when set by open()). */ unsigned int cache_readdir : 1; + /** Can be filled in by open, to indicate that flush is not needed + on close. */ + unsigned int noflush : 1; + /** Padding. Reserved for future use*/ - unsigned int padding : 25; + unsigned int padding : 24; unsigned int padding2 : 32; /** File handle id. May be filled in by filesystem in create, -- cgit v1.2.3