diff options
author | NeilBrown <neilb@suse.de> | 2008-03-04 17:29:31 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-03-04 19:35:18 -0500 |
commit | d0fae18f1b53a1d39135a968792be034bdf7ff26 (patch) | |
tree | 3448dab652696848df47dcafb7772220b9e58e4f /drivers/md/md.c | |
parent | a1801f858e57f87a7f79914346921cc729632295 (diff) |
md: clean up irregularity with raid autodetect
When a raid1 array is stopped, all components currently get added to the list
for auto-detection. However we should really only add components that were
found by autodetection in the first place. So add a flag to record that
information, and use it.
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r-- | drivers/md/md.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index b375de5c1af2..a71241c5ae72 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -1503,7 +1503,8 @@ static void export_rdev(mdk_rdev_t * rdev) | |||
1503 | free_disk_sb(rdev); | 1503 | free_disk_sb(rdev); |
1504 | list_del_init(&rdev->same_set); | 1504 | list_del_init(&rdev->same_set); |
1505 | #ifndef MODULE | 1505 | #ifndef MODULE |
1506 | md_autodetect_dev(rdev->bdev->bd_dev); | 1506 | if (test_bit(AutoDetected, &rdev->flags)) |
1507 | md_autodetect_dev(rdev->bdev->bd_dev); | ||
1507 | #endif | 1508 | #endif |
1508 | unlock_rdev(rdev); | 1509 | unlock_rdev(rdev); |
1509 | kobject_put(&rdev->kobj); | 1510 | kobject_put(&rdev->kobj); |
@@ -6025,6 +6026,7 @@ static void autostart_arrays(int part) | |||
6025 | MD_BUG(); | 6026 | MD_BUG(); |
6026 | continue; | 6027 | continue; |
6027 | } | 6028 | } |
6029 | set_bit(AutoDetected, &rdev->flags); | ||
6028 | list_add(&rdev->same_set, &pending_raid_disks); | 6030 | list_add(&rdev->same_set, &pending_raid_disks); |
6029 | i_passed++; | 6031 | i_passed++; |
6030 | } | 6032 | } |