aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/nvme/host/multipath.c
diff options
context:
space:
mode:
authorSagi Grimberg <sagi@grimberg.me>2018-11-02 11:22:13 -0700
committerJens Axboe <axboe@kernel.dk>2018-11-09 06:14:47 -0700
commit8f676b8508c250bbe255096522fdefb73f1ea0b9 (patch)
tree4de2434de7617e53fe8b333d47997b6cb6ad7a09 /drivers/nvme/host/multipath.c
parentnvmet: don't try to add ns to p2p map unless it actually uses it (diff)
downloadlinux-dev-8f676b8508c250bbe255096522fdefb73f1ea0b9.tar.xz
linux-dev-8f676b8508c250bbe255096522fdefb73f1ea0b9.zip
nvme: make sure ns head inherits underlying device limits
Whenever we update ns_head info, we need to make sure it is still compatible with all underlying backing devices because although nvme multipath doesn't have any explicit use of these limits, other devices can still be stacked on top of it which may rely on the underlying limits. Start with unlimited stacking limits, and every info update iterate over siblings and adjust queue limits. Signed-off-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to '')
-rw-r--r--drivers/nvme/host/multipath.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c
index 5e3cc8c59a39..9901afd804ce 100644
--- a/drivers/nvme/host/multipath.c
+++ b/drivers/nvme/host/multipath.c
@@ -285,6 +285,7 @@ int nvme_mpath_alloc_disk(struct nvme_ctrl *ctrl, struct nvme_ns_head *head)
blk_queue_flag_set(QUEUE_FLAG_NONROT, q);
/* set to a default value for 512 until disk is validated */
blk_queue_logical_block_size(q, 512);
+ blk_set_stacking_limits(&q->limits);
/* we need to propagate up the VMC settings */
if (ctrl->vwc & NVME_CTRL_VWC_PRESENT)