Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nvmet: do not return 'reserved' for empty TSAS values
@ 2024-06-14 10:44 Hannes Reinecke
  2024-06-14 16:48 ` Christoph Hellwig
  2024-06-14 23:42 ` Chaitanya Kulkarni
  0 siblings, 2 replies; 3+ messages in thread
From: Hannes Reinecke @ 2024-06-14 10:44 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Sagi Grimberg, Keith Busch, linux-nvme, Hannes Reinecke

The 'TSAS' value is only defined for TCP and RDMA, but returning
'reserved' for undefined values tricked nvmetcli to try to write
'reserved' when restoring from a config file. This caused an error
and the configuration would not be applied.

Fixes: 3f123494db72 ("nvmet: make TCP sectype settable via configfs")

Signed-off-by: Hannes Reinecke <hare@kernel.org>
---
 drivers/nvme/target/configfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvme/target/configfs.c b/drivers/nvme/target/configfs.c
index bd87dfd173a4..e60224356048 100644
--- a/drivers/nvme/target/configfs.c
+++ b/drivers/nvme/target/configfs.c
@@ -410,7 +410,7 @@ static ssize_t nvmet_addr_tsas_show(struct config_item *item,
 				return sprintf(page, "%s\n", nvmet_addr_tsas_rdma[i].name);
 		}
 	}
-	return sprintf(page, "reserved\n");
+	return sprintf(page, "\n");
 }
 
 static ssize_t nvmet_addr_tsas_store(struct config_item *item,
-- 
2.35.3



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

* Re: [PATCH] nvmet: do not return 'reserved' for empty TSAS values
  2024-06-14 10:44 [PATCH] nvmet: do not return 'reserved' for empty TSAS values Hannes Reinecke
@ 2024-06-14 16:48 ` Christoph Hellwig
  2024-06-14 23:42 ` Chaitanya Kulkarni
  1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2024-06-14 16:48 UTC (permalink / raw)
  To: Hannes Reinecke; +Cc: Christoph Hellwig, Sagi Grimberg, Keith Busch, linux-nvme

On Fri, Jun 14, 2024 at 12:44:23PM +0200, Hannes Reinecke wrote:
> The 'TSAS' value is only defined for TCP and RDMA, but returning
> 'reserved' for undefined values tricked nvmetcli to try to write
> 'reserved' when restoring from a config file. This caused an error
> and the configuration would not be applied.

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH] nvmet: do not return 'reserved' for empty TSAS values
  2024-06-14 10:44 [PATCH] nvmet: do not return 'reserved' for empty TSAS values Hannes Reinecke
  2024-06-14 16:48 ` Christoph Hellwig
@ 2024-06-14 23:42 ` Chaitanya Kulkarni
  1 sibling, 0 replies; 3+ messages in thread
From: Chaitanya Kulkarni @ 2024-06-14 23:42 UTC (permalink / raw)
  To: Hannes Reinecke, Christoph Hellwig
  Cc: Sagi Grimberg, Keith Busch, linux-nvme@lists.infradead.org

On 6/14/24 03:44, Hannes Reinecke wrote:
> The 'TSAS' value is only defined for TCP and RDMA, but returning
> 'reserved' for undefined values tricked nvmetcli to try to write
> 'reserved' when restoring from a config file. This caused an error
> and the configuration would not be applied.
>
> Fixes: 3f123494db72 ("nvmet: make TCP sectype settable via configfs")
>
> Signed-off-by: Hannes Reinecke<hare@kernel.org>

Looks good.

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

-ck



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

end of thread, other threads:[~2024-06-14 23:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-14 10:44 [PATCH] nvmet: do not return 'reserved' for empty TSAS values Hannes Reinecke
2024-06-14 16:48 ` Christoph Hellwig
2024-06-14 23:42 ` Chaitanya Kulkarni

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