diff options
-rw-r--r-- | drivers/md/md.c | 4 | ||||
-rw-r--r-- | include/linux/raid/md_k.h | 1 |
2 files changed, 4 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 | } |
diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h index 85a068bab625..7bb6d1abf71e 100644 --- a/include/linux/raid/md_k.h +++ b/include/linux/raid/md_k.h | |||
@@ -83,6 +83,7 @@ struct mdk_rdev_s | |||
83 | #define BarriersNotsupp 5 /* BIO_RW_BARRIER is not supported */ | 83 | #define BarriersNotsupp 5 /* BIO_RW_BARRIER is not supported */ |
84 | #define AllReserved 6 /* If whole device is reserved for | 84 | #define AllReserved 6 /* If whole device is reserved for |
85 | * one array */ | 85 | * one array */ |
86 | #define AutoDetected 7 /* added by auto-detect */ | ||
86 | 87 | ||
87 | int desc_nr; /* descriptor index in the superblock */ | 88 | int desc_nr; /* descriptor index in the superblock */ |
88 | int raid_disk; /* role of device in array */ | 89 | int raid_disk; /* role of device in array */ |