lkml.org 
[lkml]   [2021]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFC v2] ext4:fix warning in mark_buffer_dirty as IO error when mount with errors=continue
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>

\
 
 \ /
  Last update: 2021-07-01 17:00    [W:0.304 / U:0.824 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site