nvme: enable generic interface (/dev/ngXnY) for unknown command sets
authorJoel Granados <j.granados@samsung.com>
Tue, 12 Jul 2022 18:33:04 +0000 (20:33 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 2 Aug 2022 23:22:53 +0000 (17:22 -0600)
commiteb867ee995bd687154adb77bf7fda05c7d16fd9d
tree65ab95ea6d33531d0baf9d56cf492e48d7e63958
parent1e4ea66af1db4fde5988b6ed43341872a17e390d
nvme: enable generic interface (/dev/ngXnY) for unknown command sets

Extend nvme_alloc_ns() and nvme_validate_ns() for unknown command-set as
well. Both are made to use a new helper (nvme_update_ns_info_cs_indep)
which is similar to nvme_update_ns_info but performs fewer operations
to get the generic interface up.

Suggested-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Joel Granados <j.granados@samsung.com>
Signed-off-by: Kanchan Joshi <joshi.k@samsung.com>
[hch: rebased on other refactoring patches]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Javier González <javier.gonz@samsung.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/host/core.c