[PATCH 1/2] nvme: multipath: atomic queue limits need to be inherited
John Garry
john.g.garry at oracle.com
Wed Apr 30 22:47:00 PDT 2025
On 30/04/2025 18:18, Alan Adamson wrote:
Thanks for doing this.
> When a controller is attached that has the CMIC.MCTRS bit set, it indicates
> the subsystem supports multiple controllers and it is possible a namespace
> can be shared between those multiple controllers in a multipathed
> configuration.
>
> When a namespace of a CMIC.MCTRS enabled subsystem is allocated, a
> multipath node is created. The queue limits for this node are inherited
> from the namespace being allocated. When inheriting queue limits, the
> features being inherited need to be specified. The atomic write feature
> (BLK_FEAT_ATOMIC_WRITES) was not specified so the atomic queue limits
> were not inherited by the multipath disk node which resulted in the sysfs
> atomic write attributes being zeroed. The fix is to include
> BLK_FEAT_ATOMIC_WRITES in the list of features to be inherited.
nit: is this really being inherited? It seems to be just be explicitly
enabled.
>
> Signed-off-by: Alan Adamson <alan.adamson at oracle.com>
> Signed-off-by: John Garry <john.g.garry at oracle.com>
Please add the following instead Signed-off-by:
Reviewed-by: John Garry <john.g.garry at oracle.com>
> ---
> drivers/nvme/host/multipath.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c
> index 250f3da67cc9..cf0ef4745564 100644
> --- a/drivers/nvme/host/multipath.c
> +++ b/drivers/nvme/host/multipath.c
> @@ -638,7 +638,8 @@ int nvme_mpath_alloc_disk(struct nvme_ctrl *ctrl, struct nvme_ns_head *head)
>
> blk_set_stacking_limits(&lim);
> lim.dma_alignment = 3;
> - lim.features |= BLK_FEAT_IO_STAT | BLK_FEAT_NOWAIT | BLK_FEAT_POLL;
> + lim.features |= BLK_FEAT_IO_STAT | BLK_FEAT_NOWAIT |
> + BLK_FEAT_POLL | BLK_FEAT_ATOMIC_WRITES;
> if (head->ids.csi == NVME_CSI_ZNS)
> lim.features |= BLK_FEAT_ZONED;
>
More information about the Linux-nvme
mailing list