mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 08:03:01 +09:00
block: support pi with extended metadata
The nvme spec allows protection information formats with metadata extending beyond the pi field. Use the actual size of the metadata field for incrementing the buffer. Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Keith Busch <kbusch@kernel.org> Link: https://lore.kernel.org/r/20220303201312.3255347-2-kbusch@kernel.org Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
@@ -44,7 +44,7 @@ static blk_status_t t10_pi_generate(struct blk_integrity_iter *iter,
|
||||
pi->ref_tag = 0;
|
||||
|
||||
iter->data_buf += iter->interval;
|
||||
iter->prot_buf += sizeof(struct t10_pi_tuple);
|
||||
iter->prot_buf += iter->tuple_size;
|
||||
iter->seed++;
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ static blk_status_t t10_pi_verify(struct blk_integrity_iter *iter,
|
||||
|
||||
next:
|
||||
iter->data_buf += iter->interval;
|
||||
iter->prot_buf += sizeof(struct t10_pi_tuple);
|
||||
iter->prot_buf += iter->tuple_size;
|
||||
iter->seed++;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user