lib/nvme: Set ANA transition time value

ANA transition time shall be non-zero if controller supports ANA
reporting. Linux NVMe host sets this value to 10, and we don't
have any reason to change from that.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I61396695dacf47fad40e3cea3311e555729d9e3e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3909
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
Shuhei Matsumoto 2020-08-24 09:01:09 +09:00 committed by Tomasz Zawadzki
parent 9c08d43ab7
commit 6206e46883

View File

@ -59,6 +59,8 @@
*/
#define FW_VERSION SPDK_VERSION_MAJOR_STRING SPDK_VERSION_MINOR_STRING SPDK_VERSION_PATCH_STRING
#define ANA_TRANSITION_TIME_IN_SEC 10
/*
* Support for custom admin command handlers
*/
@ -2070,6 +2072,7 @@ spdk_nvmf_ctrlr_identify_ctrlr(struct spdk_nvmf_ctrlr *ctrlr, struct spdk_nvme_c
cdata->oncs.write_zeroes = nvmf_ctrlr_write_zeroes_supported(ctrlr);
cdata->oncs.reservations = 1;
if (subsystem->ana_reporting) {
cdata->anatt = ANA_TRANSITION_TIME_IN_SEC;
cdata->anacap.ana_optimized_state = 1;
/* ANAGRPID does not change while namespace is attached to controller */
cdata->anacap.no_change_anagrpid = 1;