diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-08-29 11:39:34 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-08-29 11:39:34 -0400 |
commit | 83b7a664a0c7c39ccfa4c72535dc1c001d4e7a18 (patch) | |
tree | 5ba3bbbe977c2047658b41e22d6b2abd5686bf15 /drivers/md/md.c | |
parent | 8638460540749ddb1beca9e9a68d655a6fe6df65 (diff) | |
parent | d96299537e43681942ea272e00b0e529aa5b5fa4 (diff) |
Merge branch 'master' into gfs2
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r-- | drivers/md/md.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index b6d16022a53e..8dbab2ef3885 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -1597,6 +1597,19 @@ void md_update_sb(mddev_t * mddev) | |||
1597 | 1597 | ||
1598 | repeat: | 1598 | repeat: |
1599 | spin_lock_irq(&mddev->write_lock); | 1599 | spin_lock_irq(&mddev->write_lock); |
1600 | |||
1601 | if (mddev->degraded && mddev->sb_dirty == 3) | ||
1602 | /* If the array is degraded, then skipping spares is both | ||
1603 | * dangerous and fairly pointless. | ||
1604 | * Dangerous because a device that was removed from the array | ||
1605 | * might have a event_count that still looks up-to-date, | ||
1606 | * so it can be re-added without a resync. | ||
1607 | * Pointless because if there are any spares to skip, | ||
1608 | * then a recovery will happen and soon that array won't | ||
1609 | * be degraded any more and the spare can go back to sleep then. | ||
1610 | */ | ||
1611 | mddev->sb_dirty = 1; | ||
1612 | |||
1600 | sync_req = mddev->in_sync; | 1613 | sync_req = mddev->in_sync; |
1601 | mddev->utime = get_seconds(); | 1614 | mddev->utime = get_seconds(); |
1602 | if (mddev->sb_dirty == 3) | 1615 | if (mddev->sb_dirty == 3) |