diff options
| author | Alan Adamson <alan.adamson@oracle.com> | 2025-05-08 15:38:00 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-06-04 14:45:10 +0200 |
| commit | 4235aa3629dc1ea851fb02a1cdfb0f91738b98e3 (patch) | |
| tree | b11bd4a765a12f8e985db7e6c3cdd39570a78a02 | |
| parent | c53f23f7075c9f63f14d7ec8f2cc3e33e118d986 (diff) | |
| download | linux-4235aa3629dc1ea851fb02a1cdfb0f91738b98e3.tar.gz linux-4235aa3629dc1ea851fb02a1cdfb0f91738b98e3.tar.bz2 linux-4235aa3629dc1ea851fb02a1cdfb0f91738b98e3.zip | |
nvme: multipath: enable BLK_FEAT_ATOMIC_WRITES for multipathing
[ Upstream commit a21675ee3b1ba094e229ae4cd8bddf7d215ab1b9 ]
A change to QEMU resulted in all nvme controllers (single and
multi-controller subsystems) to have its CMIC.MCTRS bit set which
indicates the subsystem supports multiple controllers and it is possible
a namespace can be shared between those multiple controllers in a
multipath 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.
Signed-off-by: Alan Adamson <alan.adamson@oracle.com>
Reviewed-by: John Garry <john.g.garry@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
| -rw-r--r-- | drivers/nvme/host/multipath.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c index f39823cde62c..ac17e650327f 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; |
