Skip to contentSkip to conversation

nvme-multipath: set QUEUE_FLAG_NOWAIT

PATCH In review Christoph Hellwig 2 participants 2 messages Aug 23, 2021 NVMe

lore
Share & tools
lore

Christoph Hellwig

author maintainer
#0 lore raw

PATCH 1/1 nvme-multipath: set QUEUE_FLAG_NOWAIT

The nvme multipathing code just dispatches bios to one of the blk-mq based paths and never blocks on its own, so set QUEUE_FLAG_NOWAIT to support REQ_NOWAIT bios.

---
 drivers/nvme/host/multipath.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/nvme/host/multipath.c +2 -0
index d390f14b8bb6..c77dfe28df67 100644
@@ -480,6 +480,8 @@ int nvme_mpath_alloc_disk(struct nvme_ctrl *ctrl, struct nvme_ns_head *head)
 			ctrl->subsys->instance, head->instance);
 
 	blk_queue_flag_set(QUEUE_FLAG_NONROT, head->disk->queue);
+	blk_queue_flag_set(QUEUE_FLAG_NOWAIT, head->disk->queue);
+
 	/* set to a default value of 512 until the disk is validated */
 	blk_queue_logical_block_size(head->disk->queue, 512);
 	blk_set_stacking_limits(&head->disk->queue->limits);
Signature · 7 lines
2.30.2


_______________________________________________
Linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 16 lines

The nvme multipathing code just dispatches bios to one of the blk-mq based paths and never blocks on its own, so set QUEUE_FLAG_NOWAIT to support REQ_NOWAIT bios.

---
  drivers/nvme/host/multipath.c | 2 ++
  1 file changed, 2 insertions(+)
drivers/nvme/host/multipath.c +0 -0
index d390f14b8bb6..c77dfe28df67 100644

drivers/nvme/host/multipath.c int nvme_mpath_alloc_disk(struct nvme_ctrl *ctrl, struct nvme_ns_head *head) · line 487

Quoted 8 lines
drivers/nvme/host/multipath.c +2 -0
@@ -480,6 +480,8 @@ int nvme_mpath_alloc_disk(struct nvme_ctrl *ctrl, struct nvme_ns_head *head)
  			ctrl->subsys->instance, head->instance);
 
  	blk_queue_flag_set(QUEUE_FLAG_NONROT, head->disk->queue);
+	blk_queue_flag_set(QUEUE_FLAG_NOWAIT, head->disk->queue);
+
  	/* set to a default value of 512 until the disk is validated */
  	blk_queue_logical_block_size(head->disk->queue, 512);
  	blk_set_stacking_limits(&head->disk->queue->limits);

_______________________________________________
Linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme