diff options
author | NeilBrown <neilb@suse.de> | 2006-10-28 13:38:31 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-28 14:30:51 -0400 |
commit | 750a8f3e8f64654a584e54038c2c8db380813c79 (patch) | |
tree | d2227e5b694f4ff4ce57ce991213a8c5502f9393 /drivers/md/multipath.c | |
parent | 01ab5662f573fe3a6bcefa200f15ab3069cec8a3 (diff) |
[PATCH] md: fix up maintenance of ->degraded in multipath
A recent fix which made sure ->degraded was initialised properly exposed a
second bug - ->degraded wasn't been updated when drives failed or were
hot-added.
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/md/multipath.c')
-rw-r--r-- | drivers/md/multipath.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/multipath.c b/drivers/md/multipath.c index a6260f0e3b9e..14da37fee37b 100644 --- a/drivers/md/multipath.c +++ b/drivers/md/multipath.c | |||
@@ -277,6 +277,7 @@ static void multipath_error (mddev_t *mddev, mdk_rdev_t *rdev) | |||
277 | set_bit(Faulty, &rdev->flags); | 277 | set_bit(Faulty, &rdev->flags); |
278 | set_bit(MD_CHANGE_DEVS, &mddev->flags); | 278 | set_bit(MD_CHANGE_DEVS, &mddev->flags); |
279 | conf->working_disks--; | 279 | conf->working_disks--; |
280 | mddev->degraded++; | ||
280 | printk(KERN_ALERT "multipath: IO failure on %s," | 281 | printk(KERN_ALERT "multipath: IO failure on %s," |
281 | " disabling IO path. \n Operation continuing" | 282 | " disabling IO path. \n Operation continuing" |
282 | " on %d IO paths.\n", | 283 | " on %d IO paths.\n", |
@@ -336,6 +337,7 @@ static int multipath_add_disk(mddev_t *mddev, mdk_rdev_t *rdev) | |||
336 | blk_queue_max_sectors(mddev->queue, PAGE_SIZE>>9); | 337 | blk_queue_max_sectors(mddev->queue, PAGE_SIZE>>9); |
337 | 338 | ||
338 | conf->working_disks++; | 339 | conf->working_disks++; |
340 | mddev->degraded--; | ||
339 | rdev->raid_disk = path; | 341 | rdev->raid_disk = path; |
340 | set_bit(In_sync, &rdev->flags); | 342 | set_bit(In_sync, &rdev->flags); |
341 | rcu_assign_pointer(p->rdev, rdev); | 343 | rcu_assign_pointer(p->rdev, rdev); |