All of lore.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, jack@suse.cz
Subject: Re: [PATCH RFC v2] ext4:fix warning in mark_buffer_dirty as IO error when mount with errors=continue
Date: Thu, 1 Jul 2021 10:59:29 -0400	[thread overview]
Message-ID: <YN3YURikQ5SdEFLs@mit.edu> (raw)
In-Reply-To: <20210615090537.3423231-1-yebin10@huawei.com>

Thanks, applied.  I reworded the commit description a bit, putting the
explanation first, and cleaning up the text a bit to make it more
readable:

commit 558d6450c7755aa005d89021204b6cdcae5e848f
Author: Ye Bin <yebin10@huawei.com>
Date:   Tue Jun 15 17:05:37 2021 +0800

    ext4: fix WARN_ON_ONCE(!buffer_uptodate) after an error writing the superblock
    
    If a writeback of the superblock fails with an I/O error, the buffer
    is marked not uptodate.  However, this can cause a WARN_ON to trigger
    when we attempt to write superblock a second time.  (Which might
    succeed this time, for cerrtain types of block devices such as iSCSI
    devices over a flaky network.)
    
    Try to detect this case in flush_stashed_error_work(), and also change
    __ext4_handle_dirty_metadata() so we always set the uptodate flag, not
    just in the nojournal case.
    
    Before this commit, this problem can be repliciated via:
    
    1. dmsetup  create dust1 --table  '0 2097152 dust /dev/sdc 0 4096'
    2. mount  /dev/mapper/dust1  /home/test
    3. dmsetup message dust1 0 addbadblock 0 10
    4. cd /home/test
    5. echo "XXXXXXX" > t
    
    After a few seconds, we got following warning:

    ... <rest of commit description was unchanged, and omitted here>

      reply	other threads:[~2021-07-01 14:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-15  9:05 [PATCH RFC v2] ext4:fix warning in mark_buffer_dirty as IO error when mount with errors=continue Ye Bin
2021-07-01 14:59 ` 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=YN3YURikQ5SdEFLs@mit.edu \
    --to=tytso@mit.edu \
    --cc=adilger.kernel@dilger.ca \
    --cc=jack@suse.cz \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.