nvmf: Use correct error code on bad reservation report command

The NVMe-oF target requires 128-bit identifiers for reservations,
so the extended report format must be used. If the user issues
a reservation report command without the extended format bit set,
the specification says to fail it with the HOSTID_INCONSISTENT_FORMAT
error code.

Change-Id: I2382af4f69167322d8e2c3f06cf8d9042830a70c
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/474131
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
Ben Walker 2019-11-13 11:05:15 -07:00 committed by Tomasz Zawadzki
parent 4c42b933c9
commit ac03d9206f

View File

@ -2341,7 +2341,7 @@ nvmf_ns_reservation_report(struct spdk_nvmf_ns *ns,
if ((cmd->cdw11 & 0x00000001u) == 0) {
SPDK_ERRLOG("NVMeoF uses extended controller data structure, "
"please set EDS bit in cdw11 and try again\n");
status = SPDK_NVME_SC_INVALID_FIELD;
status = SPDK_NVME_SC_HOSTID_INCONSISTENT_FORMAT;
goto exit;
}