aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/fuse.h8
-rw-r--r--include/fuse_common.h6
-rw-r--r--include/fuse_kernel.h2
3 files changed, 15 insertions, 1 deletions
diff --git a/include/fuse.h b/include/fuse.h
index a273b15..9148688 100644
--- a/include/fuse.h
+++ b/include/fuse.h
@@ -248,6 +248,14 @@ struct fuse_config {
int auto_cache;
/**
+ * By default, fuse waits for all pending writes to complete
+ * and calls the FLUSH operation on close(2) of every fuse fd.
+ * With this option, wait and FLUSH are not done for read-only
+ * fuse fd, similar to the behavior of NFS/SMB clients.
+ */
+ int no_rofd_flush;
+
+ /**
* The timeout in seconds for which file attributes are cached
* for the purpose of checking if auto_cache should flush the
* file data on open.
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,
diff --git a/include/fuse_kernel.h b/include/fuse_kernel.h
index 018a00a..48f2000 100644
--- a/include/fuse_kernel.h
+++ b/include/fuse_kernel.h
@@ -238,12 +238,14 @@ struct fuse_file_lock {
* FOPEN_NONSEEKABLE: the file is not seekable
* FOPEN_CACHE_DIR: allow caching this directory
* FOPEN_STREAM: the file is stream-like (no file position at all)
+ * FOPEN_NOFLUSH: don't flush data cache on close (unless FUSE_WRITEBACK_CACHE)
*/
#define FOPEN_DIRECT_IO (1 << 0)
#define FOPEN_KEEP_CACHE (1 << 1)
#define FOPEN_NONSEEKABLE (1 << 2)
#define FOPEN_CACHE_DIR (1 << 3)
#define FOPEN_STREAM (1 << 4)
+#define FOPEN_NOFLUSH (1 << 5)
/**
* INIT request/reply flags