We'd occasionally merge requests with conflicting integrity flags. Introduce a merge helper which checks that the requests have compatible integrity payloads.
Showing the changes to include/linux/blkdev.h (1 of 3 files). Show all
Unified · Split
| @@ -1497,10 +1497,10 @@ extern int blk_integrity_compare(struct gendisk *, struct gendisk *); · 1496 unmodified lines | |||
| 1497 | extern int blk_rq_map_integrity_sg(struct request_queue *, struct bio *, | 1497 | extern int blk_rq_map_integrity_sg(struct request_queue *, struct bio *, |
| 1498 | struct scatterlist *); | 1498 | struct scatterlist *); |
| 1499 | extern int blk_rq_count_integrity_sg(struct request_queue *, struct bio *); | 1499 | extern int blk_rq_count_integrity_sg(struct request_queue *, struct bio *); |
| 1500 | extern int blk_integrity_merge_rq(struct request_queue *, struct request *, | 1500 | extern bool blk_integrity_merge_rq(struct request_queue *, struct request *, |
| 1501 | struct request *); | 1501 | struct request *); |
| 1502 | extern int blk_integrity_merge_bio(struct request_queue *, struct request *, | 1502 | extern bool blk_integrity_merge_bio(struct request_queue *, struct request *, |
| 1503 | struct bio *); | 1503 | struct bio *); |
| 1504 | 1504 | ||
| 1505 | static inline | 1505 | static inline |
| 1506 | struct blk_integrity *bdev_get_integrity(struct block_device *bdev) | 1506 | struct blk_integrity *bdev_get_integrity(struct block_device *bdev) |
| @@ -1580,15 +1580,15 @@ static inline unsigned short queue_max_integrity_segments(struct request_queue * · 73 unmodified lines | |||
| 1580 | { | 1580 | { |
| 1581 | return 0; | 1581 | return 0; |
| 1582 | } | 1582 | } |
| 1583 | static inline int blk_integrity_merge_rq(struct request_queue *rq, | 1583 | static inline bool blk_integrity_merge_rq(struct request_queue *rq, |
| 1584 | struct request *r1, | 1584 | struct request *r1, |
| 1585 | struct request *r2) | 1585 | struct request *r2) |
| 1586 | { | 1586 | { |
| 1587 | return 0; | 1587 | return 0; |
| 1588 | } | 1588 | } |
| 1589 | static inline int blk_integrity_merge_bio(struct request_queue *rq, | 1589 | static inline bool blk_integrity_merge_bio(struct request_queue *rq, |
| 1590 | struct request *r, | 1590 | struct request *r, |
| 1591 | struct bio *b) | 1591 | struct bio *b) |
| 1592 | { | 1592 | { |
| 1593 | return 0; | 1593 | return 0; |
| 1594 | } | 1594 | } |