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