linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fs/fuse: Call generic_write_sync after fuse write
@ 2017-08-07 15:46 nate
  2017-09-12  9:37 ` [fuse-devel] " Miklos Szeredi
  2017-10-09 10:44 ` Nate Clark
  0 siblings, 2 replies; 4+ messages in thread
From: nate @ 2017-08-07 15:46 UTC (permalink / raw)
  To: fuse-devel, linux-fsdevel; +Cc: Vitaly Zolotusky, Nate Clark

From: Vitaly Zolotusky <vitaly@unitc.com>

If the IOCB_DSYNC flag is set a sync is not being performed by
fuse_file_write_iter. Honor IOCB_DSYNC by invoking generic_write_sync
when a write has been successful. generic_write_sync appropriatly syncs
the data which was written when IOCB_DSYNC flag is set.

Signed-off-by: Vitaly Zolotusky <vitaly@unitc.com>
Signed-off-by: Nate Clark <nate@neworld.us>
---
 fs/fuse/file.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 3ee4fdc..5e0a39e 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -1227,6 +1227,8 @@ static ssize_t fuse_file_write_iter(struct kiocb *iocb, struct iov_iter *from)
 out:
 	current->backing_dev_info = NULL;
 	inode_unlock(inode);
+	if (written > 0)
+		written = generic_write_sync(iocb, written);
 
 	return written ? written : err;
 }
-- 
2.9.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-10-09 12:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-07 15:46 [PATCH] fs/fuse: Call generic_write_sync after fuse write nate
2017-09-12  9:37 ` [fuse-devel] " Miklos Szeredi
2017-10-09 10:44 ` Nate Clark
2017-10-09 12:02   ` Nate Clark

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).