public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: Ye Bin <yebin10@huawei.com>
Cc: adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC] ext4: Fix fs can't panic when abort by user
Date: Fri, 9 Apr 2021 18:41:34 -0400	[thread overview]
Message-ID: <YHDYHvV0Cj3wpO28@mit.edu> (raw)
In-Reply-To: <YHDHFv99m3A6jQjP@mit.edu>

On Fri, Apr 09, 2021 at 05:28:54PM -0400, Theodore Ts'o wrote:
> I'll apply the patch with a modified commit description to warn of
> this particular change in behavior.

Applied with the following commit description:

    ext4: always panic when errors=panic is specified
    
    Before commit 014c9caa29d3 ("ext4: make ext4_abort() use
    __ext4_error()"), the following series of commands would trigger a
    panic:
    
    1. mount /dev/sda -o ro,errors=panic test
    2. mount /dev/sda -o remount,abort test
    
    After commit 014c9caa29d3, remounting a file system using the test
    mount option "abort" will no longer trigger a panic.  This commit will
    restore the behaviour immediately before commit 014c9caa29d3.
    (However, note that the Linux kernel's behavior has not been
    consistent; some previous kernel versions, including 5.4 and 4.19
    similarly did not panic after using the mount option "abort".)
    
    This also makes a change to long-standing behaviour; namely, the
    following series commands will now cause a panic, when previously it
    did not:
    
    1. mount /dev/sda -o ro,errors=panic test
    2. echo test > /sys/fs/ext4/sda/trigger_fs_error
    
    However, this makes ext4's behaviour much more consistent, so this is
    a good thing.
    
    Fixes: 014c9caa29d3 ("ext4: make ext4_abort() use __ext4_error()")
    Signed-off-by: Ye Bin <yebin10@huawei.com>
    Link: https://lore.kernel.org/r/20210401081903.3421208-1-yebin10@huawei.com
    Signed-off-by: Theodore Ts'o <tytso@mit.edu>


      reply	other threads:[~2021-04-09 22:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-01  8:19 [RFC] ext4: Fix fs can't panic when abort by user Ye Bin
2021-04-09 21:28 ` Theodore Ts'o
2021-04-09 22:41   ` 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=YHDYHvV0Cj3wpO28@mit.edu \
    --to=tytso@mit.edu \
    --cc=adilger.kernel@dilger.ca \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yebin10@huawei.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