|
@@ -8015,6 +8015,7 @@ static blk_status_t dio_read_error(struct inode *inode, struct bio *failed_bio,
|
|
|
int segs;
|
|
|
int ret;
|
|
|
blk_status_t status;
|
|
|
+ struct bio_vec bvec;
|
|
|
|
|
|
BUG_ON(bio_op(failed_bio) == REQ_OP_WRITE);
|
|
|
|
|
@@ -8030,8 +8031,9 @@ static blk_status_t dio_read_error(struct inode *inode, struct bio *failed_bio,
|
|
|
}
|
|
|
|
|
|
segs = bio_segments(failed_bio);
|
|
|
+ bio_get_first_bvec(failed_bio, &bvec);
|
|
|
if (segs > 1 ||
|
|
|
- (failed_bio->bi_io_vec->bv_len > btrfs_inode_sectorsize(inode)))
|
|
|
+ (bvec.bv_len > btrfs_inode_sectorsize(inode)))
|
|
|
read_mode |= REQ_FAILFAST_DEV;
|
|
|
|
|
|
isector = start - btrfs_io_bio(failed_bio)->logical;
|