From: "Lukáš Czerner" <lczerner@redhat.com>
To: akpm@linux-foundation.org
Cc: tytso@mit.edu, linux-ext4@vger.kernel.org, fabf@skynet.be,
hch@infradead.org, jack@suse.cz, viro@zeniv.linux.org.uk
Subject: Re: [patch 1/1] fs/ext4/fsync.c: generic_file_fsync call based on barrier flag
Date: Mon, 23 Jun 2014 12:41:04 +0200 (CEST) [thread overview]
Message-ID: <alpine.LFD.2.00.1406231229320.2169@localhost.localdomain> (raw)
In-Reply-To: <20140606195150.728635A45DE@corp2gmr1-2.hot.corp.google.com>
On Fri, 6 Jun 2014, akpm@linux-foundation.org wrote:
> Date: Fri, 06 Jun 2014 12:51:50 -0700
> From: akpm@linux-foundation.org
> To: tytso@mit.edu
> Cc: linux-ext4@vger.kernel.org, akpm@linux-foundation.org, fabf@skynet.be,
> hch@infradead.org, jack@suse.cz, viro@zeniv.linux.org.uk
> Subject: [patch 1/1] fs/ext4/fsync.c: generic_file_fsync call based on barrier
> flag
>
> From: Fabian Frederick <fabf@skynet.be>
> Subject: fs/ext4/fsync.c: generic_file_fsync call based on barrier flag
>
> 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.
The patch itself looks good.
Reviewed-by: Lukas Czerner <lczerner@redhat.com>
Note that the actual generic_file_fsync change fixes a real bug
in ext4 where we would _not_ send a flush on sync if we have file
system without journal.
Ted, it would be useful to mention that in the commit description
along with the commit id:
ac13a829f6adb674015ab399594c089990104af7 fs/libfs.c: add generic
data flush to fsync
Thanks!
-Lukas
>
> Signed-off-by: Fabian Frederick <fabf@skynet.be>
> 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>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
>
> fs/ext4/fsync.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff -puN fs/ext4/fsync.c~fs-ext4-fsyncc-generic_file_fsync-call-based-on-barrier-flag fs/ext4/fsync.c
> --- a/fs/ext4/fsync.c~fs-ext4-fsyncc-generic_file_fsync-call-based-on-barrier-flag
> +++ a/fs/ext4/fsync.c
> @@ -107,7 +107,10 @@ int ext4_sync_file(struct file *file, lo
> }
>
> if (!journal) {
> - ret = generic_file_fsync(file, start, end, datasync);
> + 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;
> _
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
prev parent reply other threads:[~2014-06-23 10:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-06 19:51 [patch 1/1] fs/ext4/fsync.c: generic_file_fsync call based on barrier flag akpm
2014-06-23 10:41 ` Lukáš Czerner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LFD.2.00.1406231229320.2169@localhost.localdomain \
--to=lczerner@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=fabf@skynet.be \
--cc=hch@infradead.org \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox