Skip to content

Commit 8a3b3f6

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 <csander@purestorage.com>
1 parent 9b86c53 commit 8a3b3f6

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
@@ -64,7 +64,7 @@ int fs_bio_integrity_verify(struct bio *bio, sector_t sector, unsigned int size)
6464
* bio. Requires the submitter to remember the sector and the size.
6565
*/
6666
memset(&bip->bip_iter, 0, sizeof(bip->bip_iter));
67-
bip->bip_iter.bi_sector = sector;
67+
bip->bip_iter.bi_sector = bio_integrity_intervals(bi, sector);
6868
bip->bip_iter.bi_size = bio_integrity_bytes(bi, size >> SECTOR_SHIFT);
6969
return blk_status_to_errno(bio_integrity_verify(bio, &data_iter));
7070
}

0 commit comments

Comments
 (0)