Skip to content

Commit

Permalink
fuse: document fuse_fsync_in.fsync_flags
Browse files Browse the repository at this point in the history
The FUSE_FSYNC_DATASYNC flag was introduced by commit b6aeade
("[PATCH] FUSE - file operations") as a magic number.  No new values have
been added to fsync_flags since.

Signed-off-by: Alan Somers <[email protected]>
Signed-off-by: Miklos Szeredi <[email protected]>
  • Loading branch information
asomers authored and Miklos Szeredi committed Apr 24, 2019
1 parent bbd84f3 commit 154603f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion fs/fuse/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,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;
Expand Down
7 changes: 7 additions & 0 deletions include/uapi/linux/fuse.h
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,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 */
Expand Down

0 comments on commit 154603f

Please sign in to comment.