Commit b6538fe3 authored by Heinz Mauelshagen's avatar Heinz Mauelshagen Committed by NeilBrown
Browse files

md-raid0: conditional mddev->queue access to suit dm-raid



This patch is a prerequisite for dm-raid "raid0" support to allow
dm-raid to access the MD RAID0 personality doing unconditional
accesses to mddev->queue, which is NULL in case of dm-raid stacked on
top of MD.

Most of the conditional mddev->queue accesses made it to upstream but
this missing one, which prohibits md raid0 to set disk stack limits
(being done in dm core in case of md underneath dm).

Signed-off-by: default avatarHeinz Mauelshagen <heinzm@redhat.com>
Tested-by: default avatarHeinz Mauelshagen <heinzm@redhat.com>
Signed-off-by: default avatarNeilBrown <neilb@suse.de>
parent 5ebe6afa
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -188,6 +188,7 @@ static int create_strip_zones(struct mddev *mddev, struct r0conf **private_conf)
		}
		dev[j] = rdev1;

		if (mddev->queue)
			disk_stack_limits(mddev->gendisk, rdev1->bdev,
					  rdev1->data_offset << 9);