diff options
| author | Zheng Qixing <[email protected]> | 2025-07-07 07:54:12 +0000 |
|---|---|---|
| committer | Yu Kuai <[email protected]> | 2025-07-12 09:55:20 +0000 |
| commit | c0ffeb648000acdc932da7a9d33fd65e9263c54c (patch) | |
| tree | 6910d3484b0e0f4649882bb8df77722dd1cec288 /net/unix/af_unix.c | |
| parent | md/raid5: unset WQ_CPU_INTENSIVE for raid5 unbound workqueue (diff) | |
| download | kernel-c0ffeb648000acdc932da7a9d33fd65e9263c54c.tar.gz kernel-c0ffeb648000acdc932da7a9d33fd65e9263c54c.zip | |
md: allow removing faulty rdev during resync
During RAID resync, faulty rdev cannot be removed and will result in
"Device or resource busy" error when attempting hot removal.
Reproduction steps:
mdadm -Cv /dev/md0 -l1 -n3 -e1.2 /dev/sd{b..d}
mdadm /dev/md0 -f /dev/sdb
mdadm /dev/md0 -r /dev/sdb
-> mdadm: hot remove failed for /dev/sdb: Device or resource busy
After commit 4b10a3bc67c1 ("md: ensure resync is prioritized over
recovery"), when a device becomes faulty during resync, the
md_choose_sync_action() function returns early without calling
remove_and_add_spares(), preventing faulty device removal.
This patch extracts a helper function remove_spares() to support
removing faulty devices during RAID resync operations.
Fixes: 4b10a3bc67c1 ("md: ensure resync is prioritized over recovery")
Signed-off-by: Zheng Qixing <[email protected]>
Reviewed-by: Li Nan <[email protected]>
Link: https://lore.kernel.org/linux-raid/[email protected]
Signed-off-by: Yu Kuai <[email protected]>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions
