Re: [PATCH] fs/fuse: Call generic_write_sync after fuse write

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

 



Hello,

Does this patch make sense?

On Mon, Aug 7, 2017 at 11:46 AM,  <nate@xxxxxxxxxx> wrote:
> From: Vitaly Zolotusky <vitaly@xxxxxxxxx>
>
> 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@xxxxxxxxx>
> Signed-off-by: Nate Clark <nate@xxxxxxxxxx>
> ---
>  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
>

-nate



[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