Spdk/module/bdev
Anton Eidelman 0b9100e8a5 bdev/nvme: replace nn with mnan in ana_log size calculation
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>
2022-06-15 08:10:48 +00:00
..
aio Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
compress Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
crypto Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
delay Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
error Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
ftl Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
gpt Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
iscsi Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
lvol Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
malloc Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
null Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
nvme bdev/nvme: replace nn with mnan in ana_log size calculation 2022-06-15 08:10:48 +00:00
ocf Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
passthru Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
pmem Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
raid Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
rbd Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
split Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
uring Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
virtio Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
zone_block Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
Makefile Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00