Re: bug/race in md causing device to wedge in busy state

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

 



On Wed, 16 Dec 2009 20:04:46 -0500
Brett Russ <bruss@xxxxxxxxxxx> wrote:

> I'm seeing cases where an attempted remove of a manually faulted disk 
> from an existing RAID unit can fail with mdadm reporting "Device or 
> resource busy".  I've reduced the problem down to the smallest set that 
> reliably reproduces the issue:

Thanks for the very detailed report.

Can you please see if the following patch fixes the problem.

When an array wants to resync but is waiting for other arrays
on the same devices to finish their resync, it does not abort the
resync attempt properly when an error is reported.
This should fix that.

Thanks,
NeilBrown



diff --git a/drivers/md/md.c b/drivers/md/md.c
index d2aff72..42fa446 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -6504,6 +6504,8 @@ void md_do_sync(mddev_t *mddev)
 			set_bit(MD_RECOVERY_INTR, &mddev->recovery);
 			goto skip;
 		}
+		if (test_bit(MD_RECOVERY_INTR, &mddev->recovery))
+			goto skip;
 		for_each_mddev(mddev2, tmp) {
 			if (mddev2 == mddev)
 				continue;

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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