nvmet: do not return 'reserved' for empty TSAS values

BugLink: https://bugs.launchpad.net/bugs/2076435

[ Upstream commit f31e85a4d7c6ac4a3e014129c9cdc31592ea29f3 ]

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: 3f123494db ("nvmet: make TCP sectype settable via configfs")
Signed-off-by: Hannes Reinecke <hare@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Portia Stephens <portia.stephens@canonical.com>
Signed-off-by: Roxana Nicolescu <roxana.nicolescu@canonical.com>
This commit is contained in:
Hannes Reinecke
2024-06-17 09:27:26 +02:00
committed by Stefan Bader
parent bbca7e7f9d
commit 8a10df66d5
+1 -1
View File
@@ -384,7 +384,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,