diff options
Diffstat (limited to 'include/linux/bio.h')
-rw-r--r-- | include/linux/bio.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/include/linux/bio.h b/include/linux/bio.h index 5a645769f020..d2633ee099d9 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
@@ -186,6 +186,15 @@ static inline void *bio_data(struct bio *bio) | |||
186 | #define BIOVEC_SEG_BOUNDARY(q, b1, b2) \ | 186 | #define BIOVEC_SEG_BOUNDARY(q, b1, b2) \ |
187 | __BIO_SEG_BOUNDARY(bvec_to_phys((b1)), bvec_to_phys((b2)) + (b2)->bv_len, queue_segment_boundary((q))) | 187 | __BIO_SEG_BOUNDARY(bvec_to_phys((b1)), bvec_to_phys((b2)) + (b2)->bv_len, queue_segment_boundary((q))) |
188 | 188 | ||
189 | /* | ||
190 | * Check if adding a bio_vec after bprv with offset would create a gap in | ||
191 | * the SG list. Most drivers don't care about this, but some do. | ||
192 | */ | ||
193 | static inline bool bvec_gap_to_prev(struct bio_vec *bprv, unsigned int offset) | ||
194 | { | ||
195 | return offset || ((bprv->bv_offset + bprv->bv_len) & (PAGE_SIZE - 1)); | ||
196 | } | ||
197 | |||
189 | #define bio_io_error(bio) bio_endio((bio), -EIO) | 198 | #define bio_io_error(bio) bio_endio((bio), -EIO) |
190 | 199 | ||
191 | /* | 200 | /* |
@@ -644,10 +653,6 @@ struct biovec_slab { | |||
644 | 653 | ||
645 | #if defined(CONFIG_BLK_DEV_INTEGRITY) | 654 | #if defined(CONFIG_BLK_DEV_INTEGRITY) |
646 | 655 | ||
647 | |||
648 | |||
649 | #define bip_vec_idx(bip, idx) (&(bip->bip_vec[(idx)])) | ||
650 | |||
651 | #define bip_for_each_vec(bvl, bip, iter) \ | 656 | #define bip_for_each_vec(bvl, bip, iter) \ |
652 | for_each_bvec(bvl, (bip)->bip_vec, iter, (bip)->bip_iter) | 657 | for_each_bvec(bvl, (bip)->bip_vec, iter, (bip)->bip_iter) |
653 | 658 | ||