summaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorKeith Busch2014-11-04 21:18:10 +0100
committerJens Axboe2014-11-04 21:18:10 +0100
commit5940c8578fe720afbf4ef041bad0d72a101f1d88 (patch)
tree283ee9fb0326a9fb83115ce149e39c3d14467a6d /drivers/block
parentNVMe: Fix device probe waiting on kthread (diff)
downloadkernel-qcow2-linux-5940c8578fe720afbf4ef041bad0d72a101f1d88.tar.gz
kernel-qcow2-linux-5940c8578fe720afbf4ef041bad0d72a101f1d88.tar.xz
kernel-qcow2-linux-5940c8578fe720afbf4ef041bad0d72a101f1d88.zip
NVMe: Clear QUEUE_FLAG_STACKABLE
The nvme namespace request_queue's flags are initialized to QUEUE_FLAG_DEFAULT, which currently sets QUEUE_FLAG_STACKABLE. The device-mapper indicates this flag means the block driver is requset based, though this driver is bio-based and problems will occur if an nvme namespace is used with a request based dm device. This patch clears the stackable flag. Signed-off-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/nvme-core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c
index 0196fce0ddf5..8fffc68c74eb 100644
--- a/drivers/block/nvme-core.c
+++ b/drivers/block/nvme-core.c
@@ -2030,6 +2030,7 @@ static struct nvme_ns *nvme_alloc_ns(struct nvme_dev *dev, unsigned nsid,
if (!ns->queue)
goto out_free_ns;
ns->queue->queue_flags = QUEUE_FLAG_DEFAULT;
+ queue_flag_clear_unlocked(QUEUE_FLAG_STACKABLE, ns->queue);
queue_flag_set_unlocked(QUEUE_FLAG_NOMERGES, ns->queue);
queue_flag_set_unlocked(QUEUE_FLAG_NONROT, ns->queue);
queue_flag_clear_unlocked(QUEUE_FLAG_ADD_RANDOM, ns->queue);