From: Guan Junxiong <guanjunxiong@huawei.com>
Date: Thu, 3 Aug 2017 21:40:26 +0800
Subject: nvme-fabrics: log a warning if hostid is invalid
Patch-mainline: v4.14-rc1
Git-commit: 9b483da15dd0c94b62ae4e789b37dfff4410f45e
References: FATE#323952, FATE#322506
This helps users to quickly spot the reason of why connection fails
if the hostid is not compliant with the uuid format.
Signed-off-by: Guan Junxiong <guanjunxiong@huawei.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Johannes Thumshirn <jthumshirn@suse.de>
---
drivers/nvme/host/fabrics.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/nvme/host/fabrics.c
+++ b/drivers/nvme/host/fabrics.c
@@ -735,6 +735,7 @@ static int nvmf_parse_options(struct nvm
goto out;
}
if (uuid_parse(p, &hostid)) {
+ pr_err("Invalid hostid %s\n", p);
ret = -EINVAL;
goto out;
}