Commit ac03d920 authored by Ben Walker's avatar Ben Walker Committed by Tomasz Zawadzki
Browse files

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: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/474131


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarAlexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
parent 4c42b933
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
	}