]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
nvme: call nvme_identify_ns as the first thing in nvme_alloc_ns_block
authorChristoph Hellwig <hch@lst.de>
Mon, 28 Sep 2020 10:34:04 +0000 (12:34 +0200)
committerChristoph Hellwig <hch@lst.de>
Wed, 7 Oct 2020 05:56:18 +0000 (07:56 +0200)
commitfab72f5a046883ae5851c95b7c6e7a08f984e391
tree29a4d6a5d5f47c4b70bdf084aa39f75f3fcfd028
parentb8b8cd013327327e757529a0725a8c754c7890e3
nvme: call nvme_identify_ns as the first thing in nvme_alloc_ns_block

Check if the namespace actually exists as the very first thing and don't
bother with any extra work if not.  This should speed up and simplify
the sequential scanning for NVMe 1.0 devices.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
drivers/nvme/host/core.c