Calculation of the ANA log page size should use the identify ctrl MNAN field (maximum number of allowed namespaces) not the NN (maximum valid nsid value). An ANA-enabled controller must have a non-zero MNAN value, see NVMe Base Specification, Figure 251, therefore nvme_ctrlr_init_ana_log_page() may safely use MNAN. Since NN might be much higher than MNAN, ANA log size based on NN may results in a very large log page and cause a failure to get ANA log, e.g. if it is larger than the controller's MDTS. Fix: replace cdata->nn with cdata->mnan in nvme_ctrlr_init_ana_log_page() Signed-off-by: Anton Eidelman <anton@lightbitslabs.com> Change-Id: I2a522dca833a27dddad25848d7688efa23d23091 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13039 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com> Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com> |
||
---|---|---|
.. | ||
include | ||
lib | ||
.gitignore | ||
Makefile | ||
unittest.sh |