From 565932d27a338d46f7bb90832ec68db486b8c95f Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Mon, 9 Apr 2018 11:19:13 -0700 Subject: [PATCH] nvmf: fix non-deallocate Dataset Management status If the host sends a Dataset Management command that does not specify the Deallocate attribute, the NVMe-oF target should return success; the spec says that this command is advisory, and all combinations of attributes may be set. Change-Id: I5d87d93ec61d27c8d65a17bbe4accc12ba26bbd3 Signed-off-by: Daniel Verkamp Reviewed-on: https://review.gerrithub.io/406995 Tested-by: SPDK Automated Test System Reviewed-by: Ben Walker Reviewed-by: Changpeng Liu Reviewed-by: Jim Harris --- lib/nvmf/ctrlr_bdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/nvmf/ctrlr_bdev.c b/lib/nvmf/ctrlr_bdev.c index 75970d708..f5eea59f6 100644 --- a/lib/nvmf/ctrlr_bdev.c +++ b/lib/nvmf/ctrlr_bdev.c @@ -371,7 +371,8 @@ nvmf_bdev_ctrlr_dsm_cmd(struct spdk_bdev *bdev, struct spdk_bdev_desc *desc, return SPDK_NVMF_REQUEST_EXEC_STATUS_ASYNCHRONOUS; } - response->status.sc = SPDK_NVME_SC_INTERNAL_DEVICE_ERROR; + response->status.sct = SPDK_NVME_SCT_GENERIC; + response->status.sc = SPDK_NVME_SC_SUCCESS; return SPDK_NVMF_REQUEST_EXEC_STATUS_COMPLETE; }