nvme: Add SPDK_NVME_NS_COMPARE_SUPPORTED flag

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I24d09cbe21cd2694b4c3433a365dffe75cda2fa8

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477924
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Maciej Szwed 2019-12-13 12:31:19 +01:00 committed by Tomasz Zawadzki
parent f8d024b8c1
commit b95de9a3ca
2 changed files with 5 additions and 0 deletions

View File

@ -1937,6 +1937,7 @@ enum spdk_nvme_ns_flags {
metadata is transferred as a contiguous metadata is transferred as a contiguous
part of the logical block that it is associated with */ part of the logical block that it is associated with */
SPDK_NVME_NS_WRITE_UNCORRECTABLE_SUPPORTED = 0x40, /**< The write uncorrectable command is supported */ SPDK_NVME_NS_WRITE_UNCORRECTABLE_SUPPORTED = 0x40, /**< The write uncorrectable command is supported */
SPDK_NVME_NS_COMPARE_SUPPORTED = 0x80, /**< The compare command is supported */
}; };
/** /**

View File

@ -83,6 +83,10 @@ nvme_ns_set_identify_data(struct spdk_nvme_ns *ns)
ns->flags |= SPDK_NVME_NS_DEALLOCATE_SUPPORTED; ns->flags |= SPDK_NVME_NS_DEALLOCATE_SUPPORTED;
} }
if (ns->ctrlr->cdata.oncs.compare) {
ns->flags |= SPDK_NVME_NS_COMPARE_SUPPORTED;
}
if (ns->ctrlr->cdata.vwc.present) { if (ns->ctrlr->cdata.vwc.present) {
ns->flags |= SPDK_NVME_NS_FLUSH_SUPPORTED; ns->flags |= SPDK_NVME_NS_FLUSH_SUPPORTED;
} }