Skip to content

Commit 3850141

Browse files
calebsanderkawasaki
authored andcommitted
t10-pi: use bio_integrity_intervals() helper
Use bio_integrity_intervals() to convert blk_rq_pos(rq) to integrity intervals to reduce code duplication. Signed-off-by: Caleb Sander Mateos <csander@purestorage.com> Reviewed-by: Anuj Gupta <anuj20.g@samsung.com>
1 parent e9fc433 commit 3850141

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

block/t10-pi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ static void blk_integrity_remap(struct request *rq, unsigned int nr_bytes,
542542
bool prep)
543543
{
544544
struct blk_integrity *bi = &rq->q->limits.integrity;
545-
u64 ref = blk_rq_pos(rq) >> (bi->interval_exp - SECTOR_SHIFT);
545+
u64 ref = bio_integrity_intervals(bi, blk_rq_pos(rq));
546546
unsigned intervals = nr_bytes >> bi->interval_exp;
547547
struct bio *bio;
548548

0 commit comments

Comments
 (0)