Re: [PATCH -next] md: don't wait for MD_RECOVERY_NEEDED for HOT_REMOVE_DISK ioctl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 27, 2024 at 7:24 PM Yu Kuai <yukuai1@xxxxxxxxxxxxxxx> wrote:
>
> From: Yu Kuai <yukuai3@xxxxxxxxxx>
>
> Commit 90f5f7ad4f38 ("md: Wait for md_check_recovery before attempting
> device removal.") explained in the commit message that failed device
> must be reomoved from the personality first by md_check_recovery(),
> before it can be removed from the array. That's the reason the commit
> add the code to wait for MD_RECOVERY_NEEDED.
>
> However, this is not the case now, because remove_and_add_spares() is
> called directly from hot_remove_disk() from ioctl path, hence failed
> device(marked faulty) can be removed from the personality by ioctl.
>
> On the other hand, the commit introduced a performance problem that
> if MD_RECOVERY_NEEDED is set and the array is not running, ioctl will
> wait for 5s before it can return failure to user.
>
> Since the waiting is not needed now, fix the problem by removing the
> waiting.
>
> Fixes: 90f5f7ad4f38 ("md: Wait for md_check_recovery before attempting device removal.")
> Reported-by: Mateusz Kusiak <mateusz.kusiak@xxxxxxxxxxxxxxx>
> Closes: https://lore.kernel.org/all/814ff6ee-47a2-4ba0-963e-cf256ee4ecfa@xxxxxxxxxxxxxxx/
> Signed-off-by: Yu Kuai <yukuai3@xxxxxxxxxx>

Applied to md-6.11. Thanks!

Song





[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux