nvme: allow integrity when PI is not in first bytes
authorKanchan Joshi <joshi.k@samsung.com>
Thu, 1 Feb 2024 13:01:26 +0000 (18:31 +0530)
committerJens Axboe <axboe@kernel.dk>
Mon, 12 Feb 2024 15:49:31 +0000 (08:49 -0700)
commit921e81db524d17db683cc29aed7ff02f06ea3f96
treed1fb6092cef43c70910a840436d8cd0eed327cbf
parent60d21aac52e26531affdadb7543fe5b93f58b450
nvme: allow integrity when PI is not in first bytes

NVM command set 1.0 (or later) mandates PI to be in the last bytes of
metadata. But this was not supported in the block-layer, and driver
registered a nop profile.

Since block-integrity can now handle flexible PI offset, change the
driver to support this configuration.

Signed-off-by: Kanchan Joshi <joshi.k@samsung.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Link: https://lore.kernel.org/r/20240201130126.211402-4-joshi.k@samsung.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/host/core.c
drivers/nvme/host/nvme.h