Skip to content

Commit

Permalink
md-raid0: conditional mddev->queue access to suit dm-raid
Browse files Browse the repository at this point in the history
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: Heinz Mauelshagen <heinzm@redhat.com>
Tested-by: Heinz Mauelshagen <heinzm@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
  • Loading branch information
Heinz Mauelshagen authored and NeilBrown committed May 8, 2015
1 parent 5ebe6af commit b6538fe
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/md/raid0.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,9 @@ static int create_strip_zones(struct mddev *mddev, struct r0conf **private_conf)
}
dev[j] = rdev1;

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

if (rdev1->bdev->bd_disk->queue->merge_bvec_fn)
conf->has_merge_bvec = 1;
Expand Down

0 comments on commit b6538fe

Please sign in to comment.