Skip to contentSkip to conversation

nvme: make ANA support independent on native nvme multipath

PATCH In review Hannes Reinecke 4 participants 5 messages Nov 5, 2018 – Nov 8, 2018 NVMe

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nvme: make ANA support independent on native nvme multipath

NVMe native multipathing is an implementation detail on the host, and ANA support is actually independent on that.
So we shouldn't check for native NVMe multipathing when trying to evaluate whether ANA is supported; not doing so results in the ANA sysfs attributes not to be present when the 'multipath=false' module option is set.

Signed-off-by Hannes Reinecke <hare at suse.com>
---
 drivers/nvme/host/multipath.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/multipath.c +1 -1
index 4944ffdf6831..f7efcaeb2d98 100644
@@ -22,7 +22,7 @@ MODULE_PARM_DESC(multipath,
 
 inline bool nvme_ctrl_use_ana(struct nvme_ctrl *ctrl)
 {
-	return multipath && ctrl->subsys && (ctrl->subsys->cmic & (1 << 3));
+	return ctrl->subsys && (ctrl->subsys->cmic & (1 << 3));
 }
 
 /*
Signature · 1 line
2.16.4
maintainer
#1 lore raw

PATCH 1/1 nvme: make ANA support independent on native nvme multipath

Reviewed-by Sagi Grimberg <sagi at grimberg.me>
#2 lore raw

PATCH 1/1 nvme: make ANA support independent on native nvme multipath

In reply to Hannes Reinecke
Quoted 6 lines · Hannes Reinecke

NVMe native multipathing is an implementation detail on the host, and ANA support is actually independent on that.
So we shouldn't check for native NVMe multipathing when trying to evaluate whether ANA is supported; not doing so results in the ANA sysfs attributes not to be present when the 'multipath=false' module option is set.

No, we should not enable ANA support without multipathing, as we don't want people to rely on any ANA related side effects if multipathing is not enabled.

#3 lore raw
Quoted 11 lines · Christoph Hellwig
Quoted 6 lines · Hannes Reinecke

NVMe native multipathing is an implementation detail on the host, and ANA support is actually independent on that.
So we shouldn't check for native NVMe multipathing when trying to evaluate whether ANA is supported; not doing so results in the ANA sysfs attributes not to be present when the 'multipath=false' module option is set.

No, we should not enable ANA support without multipathing, as we don't want people to rely on any ANA related side effects if multipathing is not enabled.

Could you be more specific?

Do you have an example side-effect that you hold to be problematic?

As you can imagine I've long hoped for ANA to be decoupled from multipathing. Would welcome your throughts on why this is "bad".

Mike

Acked-by on v1 1/1
#4 lore raw
In reply to Hannes Reinecke
Quoted 28 lines · Hannes Reinecke

NVMe native multipathing is an implementation detail on the host, and ANA support is actually independent on that.
So we shouldn't check for native NVMe multipathing when trying to evaluate whether ANA is supported; not doing so results in the ANA sysfs attributes not to be present when the 'multipath=false' module option is set.

Signed-off-by Hannes Reinecke <hare at suse.com>
---
 drivers/nvme/host/multipath.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/multipath.c +1 -1
index 4944ffdf6831..f7efcaeb2d98 100644
@@ -22,7 +22,7 @@ MODULE_PARM_DESC(multipath,
 
 inline bool nvme_ctrl_use_ana(struct nvme_ctrl *ctrl)
 {
-	return multipath && ctrl->subsys && (ctrl->subsys->cmic & (1 << 3));
+	return ctrl->subsys && (ctrl->subsys->cmic & (1 << 3));
 }
 
 /*
Signature · 1 line
2.16.4

So you're going for ANA to work with CONFIG_NVME_MULTIPATH=Y but nvme_core.multipath=N

Yes please.

Acked-by Mike Snitzer <snitzer at redhat.com>