diff options
Diffstat (limited to 'drivers/md/raid1.c')
-rw-r--r-- | drivers/md/raid1.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index 835de7168cd3..a9c7981ddd24 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c | |||
@@ -2550,6 +2550,7 @@ static struct r1conf *setup_conf(struct mddev *mddev) | |||
2550 | err = -EINVAL; | 2550 | err = -EINVAL; |
2551 | spin_lock_init(&conf->device_lock); | 2551 | spin_lock_init(&conf->device_lock); |
2552 | rdev_for_each(rdev, mddev) { | 2552 | rdev_for_each(rdev, mddev) { |
2553 | struct request_queue *q; | ||
2553 | int disk_idx = rdev->raid_disk; | 2554 | int disk_idx = rdev->raid_disk; |
2554 | if (disk_idx >= mddev->raid_disks | 2555 | if (disk_idx >= mddev->raid_disks |
2555 | || disk_idx < 0) | 2556 | || disk_idx < 0) |
@@ -2562,6 +2563,9 @@ static struct r1conf *setup_conf(struct mddev *mddev) | |||
2562 | if (disk->rdev) | 2563 | if (disk->rdev) |
2563 | goto abort; | 2564 | goto abort; |
2564 | disk->rdev = rdev; | 2565 | disk->rdev = rdev; |
2566 | q = bdev_get_queue(rdev->bdev); | ||
2567 | if (q->merge_bvec_fn) | ||
2568 | mddev->merge_check_needed = 1; | ||
2565 | 2569 | ||
2566 | disk->head_position = 0; | 2570 | disk->head_position = 0; |
2567 | } | 2571 | } |