block: support PI at non-zero offset within metadata
authorKanchan Joshi <joshi.k@samsung.com>
Thu, 1 Feb 2024 13:01:25 +0000 (18:31 +0530)
committerJens Axboe <axboe@kernel.dk>
Mon, 12 Feb 2024 15:49:31 +0000 (08:49 -0700)
commit60d21aac52e26531affdadb7543fe5b93f58b450
tree0048ce8335e980a0f9d899fe61cbbb90c5ec713f
parent6b5c132a3f0d3b7c024ae98f0ace07c04d32cf73
block: support PI at non-zero offset within metadata

Block layer integrity processing assumes that protection information
(PI) is placed in the first bytes of each metadata block.

Remove this limitation and include the metadata before the PI in the
calculation of the guard tag.

Signed-off-by: Kanchan Joshi <joshi.k@samsung.com>
Signed-off-by: Chinmay Gameti <c.gameti@samsung.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Link: https://lore.kernel.org/r/20240201130126.211402-3-joshi.k@samsung.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bio-integrity.c
block/blk-integrity.c
block/t10-pi.c
include/linux/blk-integrity.h
include/linux/blkdev.h