Lines Matching refs:bbio
3462 int btrfs_check_data_csum(struct inode *inode, struct btrfs_bio *bbio, in btrfs_check_data_csum() argument
3472 csum_expected = btrfs_csum_ptr(fs_info, bbio->csum, bio_offset); in btrfs_check_data_csum()
3480 bbio->file_offset + bio_offset, in btrfs_check_data_csum()
3481 csum, csum_expected, bbio->mirror_num); in btrfs_check_data_csum()
3482 if (bbio->device) in btrfs_check_data_csum()
3483 btrfs_dev_stat_inc_and_print(bbio->device, in btrfs_check_data_csum()
3501 unsigned int btrfs_verify_data_csum(struct btrfs_bio *bbio, in btrfs_verify_data_csum() argument
3518 if (bbio->csum == NULL) in btrfs_verify_data_csum()
3545 ret = btrfs_check_data_csum(inode, bbio, bio_offset, page, pg_off); in btrfs_verify_data_csum()
7841 struct btrfs_bio *bbio, in btrfs_check_read_dio_bio() argument
7852 btrfs_bio_for_each_sector(fs_info, bv, bbio, iter, offset) { in btrfs_check_read_dio_bio()
7853 u64 start = bbio->file_offset + offset; in btrfs_check_read_dio_bio()
7856 (!csum || !btrfs_check_data_csum(inode, bbio, offset, bv.bv_page, in btrfs_check_read_dio_bio()
7863 ret = btrfs_repair_one_sector(inode, bbio, offset, in btrfs_check_read_dio_bio()
7881 static void btrfs_end_dio_bio(struct btrfs_bio *bbio) in btrfs_end_dio_bio() argument
7883 struct btrfs_dio_private *dip = bbio->private; in btrfs_end_dio_bio()
7884 struct bio *bio = &bbio->bio; in btrfs_end_dio_bio()
7895 err = btrfs_check_read_dio_bio(dip, bbio, !err); in btrfs_end_dio_bio()
7900 btrfs_record_physical_zoned(dip->inode, bbio->file_offset, bio); in btrfs_end_dio_bio()
10247 static blk_status_t btrfs_encoded_read_verify_csum(struct btrfs_bio *bbio) in btrfs_encoded_read_verify_csum() argument
10249 const bool uptodate = (bbio->bio.bi_status == BLK_STS_OK); in btrfs_encoded_read_verify_csum()
10250 struct btrfs_encoded_read_private *priv = bbio->private; in btrfs_encoded_read_verify_csum()
10259 return bbio->bio.bi_status; in btrfs_encoded_read_verify_csum()
10261 bio_for_each_segment_all(bvec, &bbio->bio, iter_all) { in btrfs_encoded_read_verify_csum()
10268 if (btrfs_check_data_csum(&inode->vfs_inode, bbio, bio_offset, in btrfs_encoded_read_verify_csum()
10278 static void btrfs_encoded_read_endio(struct btrfs_bio *bbio) in btrfs_encoded_read_endio() argument
10280 struct btrfs_encoded_read_private *priv = bbio->private; in btrfs_encoded_read_endio()
10283 status = btrfs_encoded_read_verify_csum(bbio); in btrfs_encoded_read_endio()
10297 btrfs_bio_free_csum(bbio); in btrfs_encoded_read_endio()
10298 bio_put(&bbio->bio); in btrfs_encoded_read_endio()