From: alex chen <alex.chen@huawei.com>
To: Jan Kara <jack@suse.cz>, Ted Tso <tytso@mit.edu>
Cc: <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH] ext4: Forbid journal_async_commit in data=ordered mode
Date: Wed, 24 Dec 2014 15:31:54 +0800 [thread overview]
Message-ID: <549A6BEA.1050302@huawei.com> (raw)
In-Reply-To: <1416930975-13676-1-git-send-email-jack@suse.cz>
On 2014/11/25 23:56, Jan Kara wrote:
> Option journal_async_commit breaks gurantees of data=ordered mode as it
> sends only a single cache flush after writing a transaction commit
> block. Thus even though the transaction including the commit block is
> fully stored on persistent storage, file data may still linger in drives
> caches and will be lost on power failure. Since all checksums match on
> journal recovery, we replay the transaction thus possibly exposing stale
> user data.
>
Hi Jan Kara,
I have two questions:
1. Is the scenario you mentioned above based on local disks, in which
data will be lost along with the host upon power failure?
2. If we use LUNs from IPSAN, I think the scenario you mentioned above
will not happen, because data on ipsan LUN will not be lost as it is
not affected by the host, and IPSAN LUNs are prevented from power
failure, and have mechanisms to guarantee data duration, Am I right?
Thank you.
Alex
> To fix this data exposure issue, remove the possibility to use
> journal_async_commit in data=ordered mode.
>
> Signed-off-by: Jan Kara <jack@suse.cz>
> ---
> fs/ext4/super.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> index b53c243a142b..c62445cb01ca 100644
> --- a/fs/ext4/super.c
> +++ b/fs/ext4/super.c
> @@ -1701,6 +1701,12 @@ static int parse_options(char *options, struct super_block *sb,
> return 0;
> }
> }
> + if (test_opt(sb, DATA_FLAGS) == EXT4_MOUNT_ORDERED_DATA &&
> + test_opt(sb, JOURNAL_ASYNC_COMMIT)) {
> + ext4_msg(sb, KERN_ERR, "can't mount with journal_async_commit "
> + "in data=ordered mode");
> + return 0;
> + }
> return 1;
> }
>
>
next prev parent reply other threads:[~2014-12-24 7:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-25 15:56 [PATCH] ext4: Forbid journal_async_commit in data=ordered mode Jan Kara
2014-11-26 1:20 ` Theodore Ts'o
2014-12-24 7:31 ` alex chen [this message]
2014-12-29 19:19 ` [PATCH] " Jan Kara
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=549A6BEA.1050302@huawei.com \
--to=alex.chen@huawei.com \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).