Re: [PATCH v3 07/13] md: update curr_resync_completed even when MD_RECOVERY_INTR is set
"Yu Kuai" <[email protected]>
| Newsgroups | gmane.linux.raid,gmane.linux.kernel |
|---|---|
| Message-ID | <[email protected]> |
在 2025/12/15 11:04, [email protected] 写道: > From: Li Nan<[email protected]> > > An error sync IO may be done and sub 'recovery_active' while its > error handling work is pending. This work sets 'recovery_disabled' > and MD_RECOVERY_INTR, then later removes the bad disk without Faulty > flag. If 'curr_resync_completed' is updated before the disk is removed, > it could lead to reading from sync-failed regions. > > With the previous patch, error IO will set badblocks or mark rdev as > Faulty, sync-failed regions are no longer readable. After waiting for > 'recovery_active' to reach 0 (in the previous line), all sync IO has > *completed*, regardless of whether MD_RECOVERY_INTR is set. Thus, the > MD_RECOVERY_INTR check can be removed. > > Signed-off-by: Li Nan<[email protected]> > --- > drivers/md/md.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Yu Kuai <[email protected]> -- Thansk, Kuai