]> git.baikalelectronics.ru Git - kernel.git/commit
nvme: fix and clarify the check for missing metadata
authorChristoph Hellwig <hch@lst.de>
Tue, 7 Nov 2017 16:27:34 +0000 (17:27 +0100)
committerJens Axboe <axboe@kernel.dk>
Sat, 11 Nov 2017 02:53:25 +0000 (19:53 -0700)
commit264f5fe7b25e6389270f0c66ecd9c30dc9155ade
tree3eadd248dd7ad63c25613593c8cc3a7683c3b72a
parent2ada3debc7f37ee447d5840a76a7e635e2596ff8
nvme: fix and clarify the check for missing metadata

Update the check in nvme_setup_rw for missing metadata so that it is
together with the other metadata handling, does not contain impossible
to reach conditions and warns if we get an impossible requests for
a (non-PI) metadata-enabled namespace when CONFIG_BLK_DEV_INTEGRITY
is not set.

Also add a little helper that checks if a given metadata configuration
contains protection information

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reported-by: Javier González <jg@lightnvm.io>
Reviewed-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/host/core.c