Skip to content

Commit 8c9e376

Browse files
committed
md: warn about updating super block failure
Many personalities will handle IO error from daemon thread(like raid1d, raid10d, raid5d), and sb will require to be clean before hanlding these failed IO. However update sb can fail, for example array is broken by IO failure, or user config sysfs api array_state. This patch adds warning if updating sb failed first, in case this will be related to IO hang. Link: https://lore.kernel.org/linux-raid/20251117085557.770572-2-yukuai@fnnas.com Signed-off-by: Yu Kuai <yukuai@fnnas.com> Reviewed-by: Li Nan <linan122@huawei.com>
1 parent 46f2195 commit 8c9e376

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/md/md.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2788,6 +2788,7 @@ void md_update_sb(struct mddev *mddev, int force_change)
27882788
if (!md_is_rdwr(mddev)) {
27892789
if (force_change)
27902790
set_bit(MD_SB_CHANGE_DEVS, &mddev->sb_flags);
2791+
pr_err("%s: can't update sb for read-only array %s\n", __func__, mdname(mddev));
27912792
return;
27922793
}
27932794

0 commit comments

Comments
 (0)