OSDN Git Service

nvme: factor out a nvme_configure_metadata helper
authorChristoph Hellwig <hch@lst.de>
Fri, 25 Sep 2020 05:19:13 +0000 (07:19 +0200)
committerChristoph Hellwig <hch@lst.de>
Wed, 7 Oct 2020 05:56:18 +0000 (07:56 +0200)
commitd4609ea8b3d3fb3423f35805843a82774cb4ef2f
tree15b5bf096cd1bcafed28c89d2e1dc8652975d8c5
parentfab72f5a046883ae5851c95b7c6e7a08f984e391
nvme: factor out a nvme_configure_metadata helper

Factor out a helper from nvme_update_ns_info that configures the
per-namespaces metadata and PI settings.  Also make sure the helpers
clear the flags explicitly instead of all of ->features to allow for
potentially reusing ->features for future non-metadata flags.

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