diff options
author | Kanchan Joshi <joshi.k@samsung.com> | 2024-02-01 14:01:25 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2024-02-12 16:49:31 +0100 |
commit | 60d21aac52e26531affdadb7543fe5b93f58b450 (patch) | |
tree | 0048ce8335e980a0f9d899fe61cbbb90c5ec713f /block/blk-integrity.c | |
parent | block: refactor guard helpers (diff) | |
download | linux-60d21aac52e26531affdadb7543fe5b93f58b450.tar.xz linux-60d21aac52e26531affdadb7543fe5b93f58b450.zip |
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>
Diffstat (limited to 'block/blk-integrity.c')
-rw-r--r-- | block/blk-integrity.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/block/blk-integrity.c b/block/blk-integrity.c index d4e9b4556d14..ccbeb6dfa87a 100644 --- a/block/blk-integrity.c +++ b/block/blk-integrity.c @@ -370,6 +370,7 @@ void blk_integrity_register(struct gendisk *disk, struct blk_integrity *template bi->profile = template->profile ? template->profile : &nop_profile; bi->tuple_size = template->tuple_size; bi->tag_size = template->tag_size; + bi->pi_offset = template->pi_offset; blk_queue_flag_set(QUEUE_FLAG_STABLE_WRITES, disk->queue); |