Skip to content

Commit b03de08

Browse files
calebsanderkawasaki
authored andcommitted
bio-integrity-fs: use integrity interval instead of sector as seed
bip_iter.bi_sector is meant to be in units of integrity intervals rather than 512-byte sectors. bio_integrity_verify() doesn't actually use it currently (it uses the passed in struct bvec_iter's bi_sector instead). But let's set it to the expected value for consistency. Signed-off-by: Caleb Sander Mateos <[email protected]> Reviewed-by: Anuj Gupta <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]>
1 parent e2f748c commit b03de08

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

block/bio-integrity-fs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ int fs_bio_integrity_verify(struct bio *bio, sector_t sector, unsigned int size)
6767
* bio. Requires the submitter to remember the sector and the size.
6868
*/
6969
memset(&bip->bip_iter, 0, sizeof(bip->bip_iter));
70-
bip->bip_iter.bi_sector = sector;
70+
bip->bip_iter.bi_sector = bio_integrity_intervals(bi, sector);
7171
bip->bip_iter.bi_size = bio_integrity_bytes(bi, size >> SECTOR_SHIFT);
7272
return blk_status_to_errno(bio_integrity_verify(bio, &data_iter));
7373
}

0 commit comments

Comments
 (0)