Skip to contentSkip to conversation

nvme: move NVMF_OPT_CTRL_LOSS_TMO to generic list of allowed options

PATCH In review Hannes Reinecke 3 participants 4 messages Feb 5, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nvme: move NVMF_OPT_CTRL_LOSS_TMO to generic list of allowed options

Every single fabrics driver with the exception of loop is setting NVMF_OPT_CTRL_LOSS_TMO, and recent nvme-cli has begun to set this in the default options when create a discovery controller. As it's not listed for loop connections to the loop controller will fail.
So move it to the generic options to avoid this failure.

---
 drivers/nvme/host/fabrics.c | 1 +
 drivers/nvme/host/fc.c      | 2 +-
 drivers/nvme/host/rdma.c    | 2 +-
 drivers/nvme/host/tcp.c     | 2 +-
 4 files changed, 4 insertions(+), 3 deletions(-)
drivers/nvme/host/fabrics.c +1 -0
index 72ac00173500..e752acfd85a4 100644
@@ -1007,6 +1007,7 @@ EXPORT_SYMBOL_GPL(nvmf_free_options);
 				 NVMF_OPT_KATO | NVMF_OPT_HOSTNQN | \
 				 NVMF_OPT_HOST_ID | NVMF_OPT_DUP_CONNECT |\
 				 NVMF_OPT_DISABLE_SQFLOW |\
+				 NVMF_OPT_CTRL_LOSS_TMO |\
 				 NVMF_OPT_FAIL_FAST_TMO)
 
 static struct nvme_ctrl *
drivers/nvme/host/fc.c +1 -1
index bcc086fcbe61..2348722ed276 100644
@@ -3721,7 +3721,7 @@ static struct nvmf_transport_ops nvme_fc_transport = {
 	.name		= "fc",
 	.module		= THIS_MODULE,
 	.required_opts	= NVMF_OPT_TRADDR | NVMF_OPT_HOST_TRADDR,
-	.allowed_opts	= NVMF_OPT_RECONNECT_DELAY | NVMF_OPT_CTRL_LOSS_TMO,
+	.allowed_opts	= NVMF_OPT_RECONNECT_DELAY,
 	.create_ctrl	= nvme_fc_create_ctrl,
 };
 
drivers/nvme/host/rdma.c +1 -1
index 634ed5f5f778..80f5740ca9c1 100644
@@ -2410,7 +2410,7 @@ static struct nvmf_transport_ops nvme_rdma_transport = {
 	.module		= THIS_MODULE,
 	.required_opts	= NVMF_OPT_TRADDR,
 	.allowed_opts	= NVMF_OPT_TRSVCID | NVMF_OPT_RECONNECT_DELAY |
-			  NVMF_OPT_HOST_TRADDR | NVMF_OPT_CTRL_LOSS_TMO |
+			  NVMF_OPT_HOST_TRADDR |
 			  NVMF_OPT_NR_WRITE_QUEUES | NVMF_OPT_NR_POLL_QUEUES |
 			  NVMF_OPT_TOS,
 	.create_ctrl	= nvme_rdma_create_ctrl,
drivers/nvme/host/tcp.c +1 -1
index eee9470bb1bd..94ab52045dfc 100644
@@ -2544,7 +2544,7 @@ static struct nvmf_transport_ops nvme_tcp_transport = {
 	.module		= THIS_MODULE,
 	.required_opts	= NVMF_OPT_TRADDR,
 	.allowed_opts	= NVMF_OPT_TRSVCID | NVMF_OPT_RECONNECT_DELAY |
-			  NVMF_OPT_HOST_TRADDR | NVMF_OPT_CTRL_LOSS_TMO |
+			  NVMF_OPT_HOST_TRADDR |
 			  NVMF_OPT_HDR_DIGEST | NVMF_OPT_DATA_DIGEST |
 			  NVMF_OPT_NR_WRITE_QUEUES | NVMF_OPT_NR_POLL_QUEUES |
 			  NVMF_OPT_TOS,
Signature · 7 lines
2.29.2


_______________________________________________
Linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme
#1 lore raw
Quoted 6 lines · Hannes Reinecke

Every single fabrics driver with the exception of loop is setting NVMF_OPT_CTRL_LOSS_TMO, and recent nvme-cli has begun to set this in the default options when create a discovery controller. As it's not listed for loop connections to the loop controller will fail.
So move it to the generic options to avoid this failure.

Well, the option doesn't really make sense for loop. I think nvme-cli needs to be fixed to not set in this case.

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

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

Every single fabrics driver with the exception of loop is setting NVMF_OPT_CTRL_LOSS_TMO, and recent nvme-cli has begun to set this in the default options when create a discovery controller. As it's not listed for loop connections to the loop controller will fail.
So move it to the generic options to avoid this failure.

Well, the option doesn't really make sense for loop. I think nvme-cli needs to be fixed to not set in this case.

Neither does NVMF_OPT_FAIL_FAST_TMO, yet there it is ...

Cheers,

Hannes

Signature · 9 lines
Dr. Hannes Reinecke                Kernel Storage Architect
[email protected]                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer

_______________________________________________
Linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme
#3 lore raw
Quoted 11 lines · Hannes Reinecke
Quoted 7 lines · Christoph Hellwig
Quoted 7 lines · Hannes Reinecke

Every single fabrics driver with the exception of loop is setting NVMF_OPT_CTRL_LOSS_TMO, and recent nvme-cli has begun to set this in the default options when create a discovery controller. As it's not listed for loop connections to the loop controller will fail.
So move it to the generic options to avoid this failure.

Quoted 4 lines
Quoted 2 lines

Well, the option doesn't really make sense for loop. I think nvme-cli needs to be fixed to not set in this case.

Neither does NVMF_OPT_FAIL_FAST_TMO, yet there it is ...

I have already sent a patch to fix this and we have decided to fix the issue with NVMe-cli.

Quoted 13 lines

Cheers,

Hannes

Signature · 9 lines
Dr. Hannes Reinecke                Kernel Storage Architect
[email protected]                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer

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

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