From: "Lukáš Czerner" <lczerner@redhat.com>
To: Namjae Jeon <namjae.jeon@samsung.com>
Cc: "Theodore Ts'o" <tytso@mit.edu>, linux-ext4 <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH 2/3] ext4: fix ZERO_RANGE test failure in data journalling mode
Date: Thu, 17 Apr 2014 10:53:45 +0200 (CEST) [thread overview]
Message-ID: <alpine.LFD.2.00.1404171051040.2143@localhost.localdomain> (raw)
In-Reply-To: <002a01cf59c3$4eaf7490$ec0e5db0$@samsung.com>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1571 bytes --]
On Thu, 17 Apr 2014, Namjae Jeon wrote:
> Date: Thu, 17 Apr 2014 07:29:18 +0900
> From: Namjae Jeon <namjae.jeon@samsung.com>
> To: Theodore Ts'o <tytso@mit.edu>
> Cc: linux-ext4 <linux-ext4@vger.kernel.org>,
> Lukáš Czerner <lczerner@redhat.com>
> Subject: [PATCH 2/3] ext4: fix ZERO_RANGE test failure in data journalling
> mode
>
> From: Namjae Jeon <namjae.jeon@samsung.com>
>
> xfstests generic/091 is failing when mounting ext4 with data=journal.
> I think that this regression is same problem that occurred prior to collapse
> range issue. So ZERO RANGE also need to call ext4_force_commit as
> collapse range.
>
> Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
> Signed-off-by: Ashish Sangwan <a.sangwan@samsung.com>
> ---
> fs/ext4/extents.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
> index f386dd6..a64242f 100644
> --- a/fs/ext4/extents.c
> +++ b/fs/ext4/extents.c
> @@ -4742,6 +4742,13 @@ static long ext4_zero_range(struct file *file, loff_t offset,
>
> trace_ext4_zero_range(inode, offset, len, mode);
>
> + /* Call ext4_force_commit to flush all data in case of data=journal. */
> + if (ext4_should_journal_data(inode)) {
> + ret = ext4_force_commit(inode->i_sb);
> + if (ret)
> + return ret;
> + }
Hi,
it makes sense. But I have a question, maybe I do not understand it
correctly but what protect us from other writes coming in after we
force the commit ?
-Lukas
> +
> /*
> * Write out all dirty pages to avoid race conditions
> * Then release them.
>
next prev parent reply other threads:[~2014-04-17 8:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-16 22:29 [PATCH 2/3] ext4: fix ZERO_RANGE test failure in data journalling mode Namjae Jeon
2014-04-17 8:53 ` Lukáš Czerner [this message]
2014-04-17 10:52 ` Namjae Jeon
2014-04-17 11:00 ` Lukáš Czerner
2014-04-17 12:01 ` Namjae Jeon
2014-04-17 12:16 ` Lukáš Czerner
2014-04-18 1:41 ` Namjae Jeon
2014-04-18 14:37 ` Theodore Ts'o
2014-04-18 16:25 ` Lukáš Czerner
2014-04-19 2:40 ` Namjae Jeon
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.1404171051040.2143@localhost.localdomain \
--to=lczerner@redhat.com \
--cc=linux-ext4@vger.kernel.org \
--cc=namjae.jeon@samsung.com \
--cc=tytso@mit.edu \
/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