lkml.org 
[lkml]   [2014]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V4 2/2] fs/ext4/fsync.c: generic_file_fsync call based on barrier flag
On Mon, 12 May 2014 11:24:26 +0800
Ming Lei <tom.leiming@gmail.com> wrote:

> On Sun, May 11, 2014 at 1:06 AM, Fabian Frederick <fabf@skynet.be> wrote:
> > generic_file_fsync has been updated to issue a flush for
> > older filesystems.
> >
> > This patch tests for barrier flag in ext4 mount flags
> > and calls the right function.
> >
> > Suggested-by: Jan Kara <jack@suse.cz>
> > Suggested-by: Christoph Hellwig <hch@infradead.org>
> > Cc: Jan Kara <jack@suse.cz>
> > Cc: Christoph Hellwig <hch@infradead.org>
> > Cc: Alexander Viro <viro@zeniv.linux.org.uk>
> > Cc: "Theodore Ts'o" <tytso@mit.edu>
> > Cc: Andrew Morton <akpm@linux-foundation.org>
> > Signed-off-by: Fabian Frederick <fabf@skynet.be>
> > ---
> > fs/ext4/fsync.c | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/fs/ext4/fsync.c b/fs/ext4/fsync.c
> > index a8bc47f..fa82c0a 100644
> > --- a/fs/ext4/fsync.c
> > +++ b/fs/ext4/fsync.c
> > @@ -108,6 +108,10 @@ int ext4_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
> >
> > if (!journal) {
> > ret = generic_file_fsync(file, start, end, datasync);
>
> Forget to remove above line?
Oops, of course ! Thanks a lot, I've sent a new version :)

Regards,
Fabian

>
> > + if (test_opt(inode->i_sb, BARRIER))
> > + ret = generic_file_fsync(file, start, end, datasync);
> > + else
> > + ret = __generic_file_fsync(file, start, end, datasync);
> > if (!ret && !hlist_empty(&inode->i_dentry))
> > ret = ext4_sync_parent(inode);
> > goto out;
>
>
>
> Thanks,
> --
> Ming Lei


\
 
 \ /
  Last update: 2014-05-12 08:01    [W:0.073 / U:1.420 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site