[PATCH] md - 1 of 7 - Fix possible hang in raid shutdown.

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

 



If a raid array was syncing on shutdown, it would hang on shutdown,
constantly re-entering md_enter_safemade.  This fixes it.

 ----------- Diffstat output ------------
 ./drivers/md/md.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

diff ./drivers/md/md.c~current~ ./drivers/md/md.c
--- ./drivers/md/md.c~current~	2004-01-23 10:30:08.000000000 +1100
+++ ./drivers/md/md.c	2004-01-23 10:32:24.000000000 +1100
@@ -3106,7 +3106,8 @@ static inline void md_enter_safemode(mdd
 {
 	if (!mddev->safemode) return;
 	if (mddev->safemode == 2 &&
-	    (atomic_read(&mddev->writes_pending) || mddev->in_sync))
+	    (atomic_read(&mddev->writes_pending) || mddev->in_sync ||
+		    mddev->recovery_cp != MaxSector))
 		return; /* avoid the lock */
 	mddev_lock_uninterruptible(mddev);
 	if (mddev->safemode && !atomic_read(&mddev->writes_pending) &&
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
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