Commit f31e85a4 authored by Hannes Reinecke's avatar Hannes Reinecke Committed by Keith Busch

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

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: 3f123494 ("nvmet: make TCP sectype settable via configfs")
Signed-off-by: default avatarHannes Reinecke <hare@kernel.org>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarChaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: default avatarKeith Busch <kbusch@kernel.org>
parent 9570a488
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment