All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 2/4] md-raid0: conditional mddev->queue access to suit dm-raid
@ 2015-04-29 12:03 heinzm
  2015-05-08 16:00 ` Brassow Jonathan
  0 siblings, 1 reply; 4+ messages in thread
From: heinzm @ 2015-04-29 12:03 UTC (permalink / raw)
  To: dm-devel; +Cc: Heinz Mauelshagen

From: Heinz Mauelshagen <heinzm@redhat.com>


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>

---
 drivers/md/raid0.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c
index 2cb59a6..6a68ef5 100644
--- a/drivers/md/raid0.c
+++ b/drivers/md/raid0.c
@@ -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;
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread
* [PATCH v2 2/4] md-raid0: conditional mddev->queue access to suit dm-raid
@ 2015-04-29 12:03 heinzm
  0 siblings, 0 replies; 4+ messages in thread
From: heinzm @ 2015-04-29 12:03 UTC (permalink / raw)
  To: linux-raid; +Cc: Heinz Mauelshagen

From: Heinz Mauelshagen <heinzm@redhat.com>


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>

---
 drivers/md/raid0.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c
index 2cb59a6..6a68ef5 100644
--- a/drivers/md/raid0.c
+++ b/drivers/md/raid0.c
@@ -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;
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-05-08 16:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-29 12:03 [PATCH v2 2/4] md-raid0: conditional mddev->queue access to suit dm-raid heinzm
2015-05-08 16:00 ` Brassow Jonathan
2015-05-08 16:52   ` Heinz Mauelshagen
  -- strict thread matches above, loose matches on Subject: below --
2015-04-29 12:03 heinzm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.