[PATCH 1/2] fuse: document fuse_fsync_in.fsync_flags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Alan Somers <asomers@xxxxxxxxxxx>
Date: Wed, 13 Mar 2019 10:24:21 -0600
Subject: [PATCH 1/2] fuse: document fuse_fsync_in.fsync_flags

The FUSE_FSYNC_DATASYNC flag was introduced by commit b6aeadeda22a as a
magic number.  No new values have been added to fsync_flags since.

Signed-off-by: Alan Somers <asomers@xxxxxxxxxxx>
---
 fs/fuse/file.c            | 2 +-
 include/uapi/linux/fuse.h | 7 +++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 06096b60f1df..db083359b56f 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -462,7 +462,7 @@ int fuse_fsync_common(struct file *file, loff_t
start, loff_t end,

     memset(&inarg, 0, sizeof(inarg));
     inarg.fh = ff->fh;
-    inarg.fsync_flags = datasync ? 1 : 0;
+    inarg.fsync_flags = datasync ? FUSE_FSYNC_FDATASYNC: 0;
     args.in.h.opcode = opcode;
     args.in.h.nodeid = get_node_id(inode);
     args.in.numargs = 1;
diff --git a/include/uapi/linux/fuse.h b/include/uapi/linux/fuse.h
index 2ac598614a8f..e4ceeb406eb3 100644
--- a/include/uapi/linux/fuse.h
+++ b/include/uapi/linux/fuse.h
@@ -353,6 +353,13 @@ struct fuse_file_lock {
  */
 #define FUSE_POLL_SCHEDULE_NOTIFY (1 << 0)

+/**
+ * Fsync flags
+ *
+ * FUSE_FSYNC_FDATASYNC: Sync data only, not metadata
+ */
+#define FUSE_FSYNC_FDATASYNC    (1 << 0)
+
 enum fuse_opcode {
     FUSE_LOOKUP        = 1,
     FUSE_FORGET        = 2,  /* no reply */
-- 
2.20.1



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux