linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: asomers@FreeBSD.org
To: Miklos Szeredi <miklos@szeredi.hu>,
	linux-fsdevel@vger.kernel.org, Nikolaus@rath.org
Cc: Alan Somers <asomers@FreeBSD.org>
Subject: [PATCH 1/3] fuse: document fuse_fsync_in.fsync_flags
Date: Fri, 19 Apr 2019 15:42:44 -0600	[thread overview]
Message-ID: <20190419214246.26290-1-asomers@FreeBSD.org> (raw)

From: Alan Somers <asomers@FreeBSD.org>

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@FreeBSD.org>
---
 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..6d8dd7035912 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.21.0


             reply	other threads:[~2019-04-19 21:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-19 21:42 asomers [this message]
2019-04-19 21:42 ` [PATCH 2/3] fuse: fix changelog entry for protocol 7.12 asomers
2019-04-19 21:42 ` [PATCH 3/3] fuse: fix changelog entry for protocol 7.9 asomers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190419214246.26290-1-asomers@FreeBSD.org \
    --to=asomers@freebsd.org \
    --cc=Nikolaus@rath.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).