From: Theodore Ts'o <tytso@mit.edu>
To: Joseph Qi <joseph.qi@huawei.com>
Cc: linux-ext4@vger.kernel.org,
"ocfs2-devel@oss.oracle.com" <ocfs2-devel@oss.oracle.com>,
Jan Kara <jack@suse.cz>,
Andrew Morton <akpm@linux-foundation.org>,
Mark Fasheh <mfasheh@suse.com>, Joel Becker <jlbec@evilplan.org>,
Junxiao Bi <junxiao.bi@oracle.com>,
jiangyiwen <jiangyiwen@huawei.com>,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH RESEND] jbd2: fix ocfs2 corrupt when updating journal superblock fails
Date: Mon, 15 Jun 2015 14:47:31 -0400 [thread overview]
Message-ID: <20150615184731.GA5003@thunk.org> (raw)
In-Reply-To: <557E703D.2060709@huawei.com>
On Mon, Jun 15, 2015 at 02:27:09PM +0800, Joseph Qi wrote:
> If updating journal superblock fails after journal data has been flushed,
> the error is omitted and this will mislead the caller as a normal case.
> In ocfs2, the checkpoint will be treated successfully and the other node
> can get the lock to update. Since the sb_start is still pointing to the
> old log block, it will rewrite the journal data during journal recovery
> by the other node. Thus the new updates will be overwritten and ocfs2
> corrupts.
> So in above case we have to return the error, and ocfs2_commit_cache will
> take care of the error and prevent the other node to do update first.
> And only after recovering journal it can do the new updates.
>
> The issue discussion mail can be found at:
> https://oss.oracle.com/pipermail/ocfs2-devel/2015-June/010856.html
> http://comments.gmane.org/gmane.comp.file-systems.ext4/48841
>
> Reported-by: Yiwen Jiang <jiangyiwen@huawei.com>
> Signed-off-by: Joseph Qi <joseph.qi@huawei.com>
> Tested-by: Yiwen Jiang <jiangyiwen@huawei.com>
> Cc: Junxiao Bi <junxiao.bi@oracle.com>
> Cc: <stable@vger.kernel.org>
Thanks, applied.
- Ted
prev parent reply other threads:[~2015-06-15 18:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-15 6:27 [PATCH RESEND] jbd2: fix ocfs2 corrupt when updating journal superblock fails Joseph Qi
2015-06-15 13:08 ` Jan Kara
2015-06-15 19:02 ` Theodore Ts'o
2015-06-15 18:47 ` Theodore Ts'o [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=20150615184731.GA5003@thunk.org \
--to=tytso@mit.edu \
--cc=akpm@linux-foundation.org \
--cc=jack@suse.cz \
--cc=jiangyiwen@huawei.com \
--cc=jlbec@evilplan.org \
--cc=joseph.qi@huawei.com \
--cc=junxiao.bi@oracle.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=mfasheh@suse.com \
--cc=ocfs2-devel@oss.oracle.com \
/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).