Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

nvme: always issue I/O Command Set specific Identify Namespace

Currently, the I/O Command Set specific Identify Namespace structure is
only fetched for controllers that support extended LBA formats. This is
because struct nvme_id_ns_nvm is only used by nvme_configure_pi_elbas(),
which is only called when the ELBAS bit is set in the CTRATT field of
the Identify Controller structure.

However, the I/O Command Set specific Identify Namespace structure will
soon be used in nvme_update_disk_info(), so always try to obtain it in
nvme_update_ns_info_block(). This Identify structure is first defined in
NVMe spec version 2.0, but controllers reporting older versions could
still implement it.

Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>

authored by

Caleb Sander Mateos and committed by
Keith Busch
823340b7 d3c04a6e

+1 -1
+1 -1
drivers/nvme/host/core.c
··· 2356 2356 } 2357 2357 lbaf = nvme_lbaf_index(id->flbas); 2358 2358 2359 - if (ns->ctrl->ctratt & NVME_CTRL_ATTR_ELBAS) { 2359 + if (nvme_id_cns_ok(ns->ctrl, NVME_ID_CNS_CS_NS)) { 2360 2360 ret = nvme_identify_ns_nvm(ns->ctrl, info->nsid, &nvm); 2361 2361 if (ret < 0) 2362 2362 goto out;