public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] nvme-multipath: set queue dma alignment to 3
@ 2022-10-24 18:57 Keith Busch
  2022-10-24 18:58 ` Sagi Grimberg
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Keith Busch @ 2022-10-24 18:57 UTC (permalink / raw)
  To: linux-nvme; +Cc: hch, sagi, Keith Busch

From: Keith Busch <kbusch@kernel.org>

NVMe spec requires all transports support dword aligned addresses, which
is already set in the namespace request_queue. Set the same limit in the
multipath device's request_queue as well.

Signed-off-by: Keith Busch <kbusch@kernel.org>
---
 drivers/nvme/host/multipath.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c
index 0ea7e441e080..93e2138a8b42 100644
--- a/drivers/nvme/host/multipath.c
+++ b/drivers/nvme/host/multipath.c
@@ -516,6 +516,7 @@ int nvme_mpath_alloc_disk(struct nvme_ctrl *ctrl, struct nvme_ns_head *head)
 	/* 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);
+	blk_queue_dma_alignment(head->disk->queue, 3);
 
 	/* we need to propagate up the VMC settings */
 	if (ctrl->vwc & NVME_CTRL_VWC_PRESENT)
-- 
2.30.2



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

* Re: [PATCH] nvme-multipath: set queue dma alignment to 3
  2022-10-24 18:57 [PATCH] nvme-multipath: set queue dma alignment to 3 Keith Busch
@ 2022-10-24 18:58 ` Sagi Grimberg
  2022-10-25  0:49 ` Chaitanya Kulkarni
  2022-10-25 15:11 ` Christoph Hellwig
  2 siblings, 0 replies; 4+ messages in thread
From: Sagi Grimberg @ 2022-10-24 18:58 UTC (permalink / raw)
  To: Keith Busch, linux-nvme; +Cc: hch, Keith Busch

Reviewed-by: Sagi Grimberg <sagi@grimberg.me>


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

* Re: [PATCH] nvme-multipath: set queue dma alignment to 3
  2022-10-24 18:57 [PATCH] nvme-multipath: set queue dma alignment to 3 Keith Busch
  2022-10-24 18:58 ` Sagi Grimberg
@ 2022-10-25  0:49 ` Chaitanya Kulkarni
  2022-10-25 15:11 ` Christoph Hellwig
  2 siblings, 0 replies; 4+ messages in thread
From: Chaitanya Kulkarni @ 2022-10-25  0:49 UTC (permalink / raw)
  To: Keith Busch, linux-nvme@lists.infradead.org
  Cc: hch@lst.de, sagi@grimberg.me, Keith Busch

On 10/24/22 11:57, Keith Busch wrote:
> From: Keith Busch <kbusch@kernel.org>
> 
> NVMe spec requires all transports support dword aligned addresses, which
> is already set in the namespace request_queue. Set the same limit in the
> multipath device's request_queue as well.
> 
> Signed-off-by: Keith Busch <kbusch@kernel.org>
>

Indeed it is.

Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>

-ck



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

* Re: [PATCH] nvme-multipath: set queue dma alignment to 3
  2022-10-24 18:57 [PATCH] nvme-multipath: set queue dma alignment to 3 Keith Busch
  2022-10-24 18:58 ` Sagi Grimberg
  2022-10-25  0:49 ` Chaitanya Kulkarni
@ 2022-10-25 15:11 ` Christoph Hellwig
  2 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2022-10-25 15:11 UTC (permalink / raw)
  To: Keith Busch; +Cc: linux-nvme, hch, sagi, Keith Busch

Thanks,

applied to nvme-6.1.


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

end of thread, other threads:[~2022-10-25 15:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-24 18:57 [PATCH] nvme-multipath: set queue dma alignment to 3 Keith Busch
2022-10-24 18:58 ` Sagi Grimberg
2022-10-25  0:49 ` Chaitanya Kulkarni
2022-10-25 15:11 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox