From: Theodore Ts'o <tytso@mit.edu>
To: Daeho Jeong <daeho.jeong@samsung.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH v2] ext4, jbd2: ensure entering into panic after recording an error in superblock
Date: Sun, 18 Oct 2015 19:38:04 -0400 [thread overview]
Message-ID: <20151018233804.GO2678@thunk.org> (raw)
In-Reply-To: <1444616359-21149-1-git-send-email-daeho.jeong@samsung.com>
On Mon, Oct 12, 2015 at 11:19:19AM +0900, Daeho Jeong wrote:
> If a EXT4 filesystem utilizes JBD2 journaling and an error occurs, the
> journaling will be aborted first and the error number will be recorded
> into JBD2 superblock and, finally, the system will enter into the
> panic state in "errors=panic" option. But, in the rare case, this
> sequence is little twisted like the below figure and it will happen
> that the system enters into panic state, which means the system reset
> in mobile environment, before completion of recording an error in the
> journal superblock. In this case, e2fsck cannot recognize that the
> filesystem failure occurred in the previous run and the corruption
> wouldn't be fixed.
>
> Task A Task B
> ext4_handle_error()
> -> jbd2_journal_abort()
> -> __journal_abort_soft()
> -> __jbd2_journal_abort_hard()
> | -> journal->j_flags |= JBD2_ABORT;
> |
> | __ext4_abort()
> | -> jbd2_journal_abort()
> | | -> __journal_abort_soft()
> | | -> if (journal->j_flags & JBD2_ABORT)
> | | return;
> | -> panic()
> |
> -> jbd2_journal_update_sb_errno()
>
> Tested-by: Hobin Woo <hobin.woo@samsung.com>
> Signed-off-by: Daeho Jeong <daeho.jeong@samsung.com>
> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Applied, thanks.
- Ted
prev parent reply other threads:[~2015-10-18 23:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-12 2:19 [PATCH v2] ext4, jbd2: ensure entering into panic after recording an error in superblock Daeho Jeong
2015-10-18 23:38 ` 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=20151018233804.GO2678@thunk.org \
--to=tytso@mit.edu \
--cc=daeho.jeong@samsung.com \
--cc=linux-ext4@vger.kernel.org \
/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).