nvmf: cleanup ana_reporting branching in spdk_nvmf_ctrlr_identify_ctrlr

Trivial chore, cleanup multiple branches for subsystem->flags.ana_reporting
that can be collapsed wtihin spdk_nvmf_ctrlr_identify_ctrlr, which makes the
code easier to read.

Signed-off-by: Jon Kohler <jon@nutanix.com>
Change-Id: Icb2064f078d730d1f28f299582dc46254c7f6df3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11951
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Jon Kohler 2022-03-15 14:17:13 -04:00 committed by Tomasz Zawadzki
parent 900d049925
commit 7a9d089b68

View File

@ -2686,14 +2686,7 @@ spdk_nvmf_ctrlr_identify_ctrlr(struct spdk_nvmf_ctrlr *ctrlr, struct spdk_nvme_c
cdata->rab = 6;
cdata->cmic.multi_port = 1;
cdata->cmic.multi_ctrlr = 1;
if (subsystem->flags.ana_reporting) {
/* Asymmetric Namespace Access Reporting is supported. */
cdata->cmic.ana_reporting = 1;
}
cdata->oaes.ns_attribute_notices = 1;
if (subsystem->flags.ana_reporting) {
cdata->oaes.ana_change_notices = 1;
}
cdata->ctratt.host_id_exhid_supported = 1;
/* We do not have any actual limitation to the number of abort commands.
* We follow the recommendation by the NVMe specification.
@ -2718,6 +2711,10 @@ 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 = ctrlr->cdata.oncs.reservations;
if (subsystem->flags.ana_reporting) {
/* Asymmetric Namespace Access Reporting is supported. */
cdata->cmic.ana_reporting = 1;
cdata->oaes.ana_change_notices = 1;
cdata->anatt = ANA_TRANSITION_TIME_IN_SEC;
/* ANA Change state is not used, and ANA Persistent Loss state
* is not supported for now.