]> git.baikalelectronics.ru Git - kernel.git/commit
nvme: refactor namespace probing
authorChristoph Hellwig <hch@lst.de>
Fri, 22 Jul 2022 16:24:18 +0000 (18:24 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 2 Aug 2022 23:22:53 +0000 (17:22 -0600)
commit2f3be286d258cf94d297a8d7bea4b24d774740cb
tree8d6d3dbe3f172c59277166158cdcb22c494b6aba
parent203bbab0a6a39b109eca5460b133f7712a7c7729
nvme: refactor namespace probing

Change nvme_ns_scan to gather all information needed for generic
namespace setup into a nvme_ns_info structure.  This structure is filled
from the Command Set Idependent Identify Namespace data structure if
it is available or else the legacy Identify namespace structure.

With that everything related to the NVM command set (and the ZNS command
set derived from it) can be encapsulated in the nvme_update_ns_info_block
function while keeping the rest of the namespace probing generic.

The downside is that we now always issue two Identify Namespace calls for
each probed namespace instead of usually just a single one previously.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Javier González <javier.gonz@samsung.com>
Reviewed-by: Joel Granados <j.granados@samsung.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/host/core.c