OSDN Git Service

nvme-fabrics: print out valid arguments when reading from /dev/nvme-fabrics
authorHannes Reinecke <hare@suse.de>
Tue, 7 Dec 2021 13:55:49 +0000 (14:55 +0100)
committerChristoph Hellwig <hch@lst.de>
Thu, 23 Dec 2021 10:22:45 +0000 (11:22 +0100)
commitf18ee3d988157ebcadc9b7e5fd34811938f50223
tree35fa503aaf13484dc581ee2364cc8769d399fd79
parent3427f2b2c533d97bcc57b4237c2af21a8bd2cdbc
nvme-fabrics: print out valid arguments when reading from /dev/nvme-fabrics

Currently applications have a hard time figuring out which
nvme-over-fabrics arguments are supported for any given kernel;
the ioctl will return an error code on failure, and the application
has to guess whether this was due to an invalid argument or due
to a connection or controller error.
With this patch applications can read a list of supported
arguments by simply reading from /dev/nvme-fabrics, allowing
them to validate the connection string.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/fabrics.c