]> git.baikalelectronics.ru Git - kernel.git/commit
fuse: honor iocb sync flags on write
authorMiklos Szeredi <mszeredi@redhat.com>
Tue, 12 Sep 2017 14:57:53 +0000 (16:57 +0200)
committerMiklos Szeredi <mszeredi@redhat.com>
Tue, 12 Sep 2017 14:57:53 +0000 (16:57 +0200)
commitbab8ce77fef6241a216df0910de8ad6f6d05027d
treec13747b8adb3435b46c1c65647d5f7ab173cc0a7
parent35c8c66996b30a574b56baf9030cace6ff7b5330
fuse: honor iocb sync flags on write

If the IOCB_DSYNC flag is set a sync is not being performed by
fuse_file_write_iter.

Honor IOCB_DSYNC/IOCB_SYNC by setting O_DYSNC/O_SYNC respectively in the
flags filed of the write request.

We don't need to sync data or metadata, since fuse_perform_write() does
write-through and the filesystem is responsible for updating file times.

Original patch by Vitaly Zolotusky.

Reported-by: Nate Clark <nate@neworld.us>
Cc: Vitaly Zolotusky <vitaly@unitc.com>.
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/fuse/cuse.c
fs/fuse/file.c
fs/fuse/fuse_i.h