Spdk/module/bdev
Shuhei Matsumoto 81e92f6bca bdev/nvme: Calculate and use active ns count to read ANA log page
nvme_ctrlr_init_ana_log_page() had used cdata->mnan as active ns count
to allocate a buffer and read a ANA log page into the buffer.

However, cdata->mnan was larger than the real active ns count and caused
an issue when the corresponding NVMe-oF target set the bit 18 of the SGL
support field in the Identify Controller Data structure.

We still need to use cdata->mnan to allocate the buffer because
number of namespaces may be increased dynamically after initialization.

Hence, rename nvme_ctrlr::ana_log_page_size to
nvme_ctrlr::max_ana_log_page_size and calculate and use the active ns
count to read the ANA log page. Check if the current ana_log_page_size
is not larger than nvme_ctrlr->max_ana_log_page_size.

Fixes issue #2584

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: Ieb10b9c793c4f48ffd88d517c0e9a55184b7d935
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13653
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-07-14 09:47:41 +00:00
..
aio check_format: For C files only, fix return type breaks 2022-06-27 09:33:48 +00:00
compress bdev/compress: make lb_size optional in bdev_compress_create 2022-07-04 07:23:26 +00:00
crypto check_format: For C files only, fix return type breaks 2022-06-27 09:33:48 +00:00
delay check_format: For C files only, fix return type breaks 2022-06-27 09:33:48 +00:00
error Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
gpt check_format: For C files only, fix return type breaks 2022-06-27 09:33:48 +00:00
iscsi check_format: For C files only, fix return type breaks 2022-06-27 09:33:48 +00:00
lvol blobstore: implement spdk_bs_grow and bdev_lvol_grow_lvstore RPC 2022-06-28 17:55:43 +00:00
malloc check_format: For C files only, fix return type breaks 2022-06-27 09:33:48 +00:00
null Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
nvme bdev/nvme: Calculate and use active ns count to read ANA log page 2022-07-14 09:47:41 +00:00
ocf check_format: For C files only, fix return type breaks 2022-06-27 09:33:48 +00:00
passthru check_format: For C files only, fix return type breaks 2022-06-27 09:33:48 +00:00
pmem Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
raid raid/concat: update bdev readv/writev to ext API. 2022-07-14 09:46:56 +00:00
rbd Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
split check_format: For C files only, fix return type breaks 2022-06-27 09:33:48 +00:00
uring check_format: For C files only, fix return type breaks 2022-06-27 09:33:48 +00:00
virtio check_format: For C files only, fix return type breaks 2022-06-27 09:33:48 +00:00
zone_block Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
Makefile ftl: remove deprecated ftl library 2022-07-11 07:23:58 +00:00