bdev/nvme: write TransportID to config file

It was writing TransportId (lower-case d) instead.

While here, fix similar issue in etc/spdk/nvmf.conf.in.

lib/conf uses strcasecmp(), meaning TransportID and
TransportId are effectively the same, but it's better
to reduce confusion and just use the same in all places.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I2996ba46a5c2a239650e841d5b57424ff00f47e6

Reviewed-on: https://review.gerrithub.io/426001
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Jim Harris 2018-09-18 15:47:08 -07:00 committed by Ben Walker
parent 4a7240a7f5
commit 2484d0d1cd
2 changed files with 5 additions and 5 deletions

View File

@ -88,8 +88,8 @@
# other sections in the configuration file. For NVMe devices, a namespace
# is automatically appended to each name in the format <YourName>nY, where
# Y is the NSID (starts at 1).
TransportId "trtype:PCIe traddr:0000:00:00.0" Nvme0
TransportId "trtype:PCIe traddr:0000:01:00.0" Nvme1
TransportID "trtype:PCIe traddr:0000:00:00.0" Nvme0
TransportID "trtype:PCIe traddr:0000:01:00.0" Nvme1
# The number of attempts per I/O when an I/O fails. Do not include
# this key to get the default behavior.

View File

@ -1669,7 +1669,7 @@ bdev_nvme_get_spdk_running_config(FILE *fp)
}
if (nvme_ctrlr->trid.trtype == SPDK_NVME_TRANSPORT_PCIE) {
fprintf(fp, "TransportId \"trtype:%s traddr:%s\" %s\n",
fprintf(fp, "TransportID \"trtype:%s traddr:%s\" %s\n",
trtype,
nvme_ctrlr->trid.traddr, nvme_ctrlr->name);
} else {
@ -1678,12 +1678,12 @@ bdev_nvme_get_spdk_running_config(FILE *fp)
adrfam = spdk_nvme_transport_id_adrfam_str(nvme_ctrlr->trid.adrfam);
if (adrfam) {
fprintf(fp, "TransportId \"trtype:%s adrfam:%s traddr:%s trsvcid:%s subnqn:%s\" %s\n",
fprintf(fp, "TransportID \"trtype:%s adrfam:%s traddr:%s trsvcid:%s subnqn:%s\" %s\n",
trtype, adrfam,
nvme_ctrlr->trid.traddr, nvme_ctrlr->trid.trsvcid,
nvme_ctrlr->trid.subnqn, nvme_ctrlr->name);
} else {
fprintf(fp, "TransportId \"trtype:%s traddr:%s trsvcid:%s subnqn:%s\" %s\n",
fprintf(fp, "TransportID \"trtype:%s traddr:%s trsvcid:%s subnqn:%s\" %s\n",
trtype,
nvme_ctrlr->trid.traddr, nvme_ctrlr->trid.trsvcid,
nvme_ctrlr->trid.subnqn, nvme_ctrlr->name);