Skip to content

Commit 3f2aaa7

Browse files
Li Nanintel-lab-lkp
authored andcommitted
md/raid5: Fix a deadlock of reshape and suspend
Commit 868bba5 ("md/raid5: fix a deadlock in the case that reshape is interrupted") fixed a raid deadlock of reshape, but a similar issue is hit by mdadm test 25raid456-reshape-deadlock. INFO: task (udev-worker):63822 blocked for more than 122 seconds. Not tainted 6.18.0-rc2-g0555b5424915-dirty torvalds#153 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. __schedule schedule schedule_timeout wait_woken raid5_make_request md_handle_request md_submit_bio [...] blkdev_read_iter vfs_read ksys_read __x64_sys_read It is triggered by: 1) normal IO waits for reshape to progress 2) user sets ACTION_FROZEN via ioctl 3) reshape is interrupted and cannot restart 4) users try to suspend array while active IO waits reshape Following Kuai's previous fix, such IOs should fail in make_stripe_request(). Thus, set a timeout for wait_woken() to fix the deadlock, and blocked IO will fail in the next cycle. Signed-off-by: Li Nan <linan122@huawei.com>
1 parent ac3fd01 commit 3f2aaa7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/md/raid5.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6185,7 +6185,7 @@ static bool raid5_make_request(struct mddev *mddev, struct bio * bi)
61856185
}
61866186

61876187
wait_woken(&wait, TASK_UNINTERRUPTIBLE,
6188-
MAX_SCHEDULE_TIMEOUT);
6188+
msecs_to_jiffies(10000));
61896189
continue;
61906190
}
61916191

0 commit comments

Comments
 (0)