md: raid5: add prerequisite to run underneath dm-raid
In case md runs underneath the dm-raid target, the mddev does not have a request queue or gendisk, thus avoid accesses. This patch adds a missing conditional to the raid5 personality. Signed-of-by: Heinz Mauelshagen <heinzm@redhat.com> Signed-off-by: Shaohua Li <shli@fb.com>
This commit is contained in:
parent
859644f0fa
commit
fe67d19a2d
|
@ -7572,8 +7572,10 @@ static void raid5_finish_reshape(struct mddev *mddev)
|
|||
|
||||
if (mddev->delta_disks > 0) {
|
||||
md_set_array_sectors(mddev, raid5_size(mddev, 0, 0));
|
||||
set_capacity(mddev->gendisk, mddev->array_sectors);
|
||||
revalidate_disk(mddev->gendisk);
|
||||
if (mddev->queue) {
|
||||
set_capacity(mddev->gendisk, mddev->array_sectors);
|
||||
revalidate_disk(mddev->gendisk);
|
||||
}
|
||||
} else {
|
||||
int d;
|
||||
spin_lock_irq(&conf->device_lock);
|
||||
|
|
Loading…
Reference in New Issue