diff options
author | Martin K. Petersen <martin.petersen@oracle.com> | 2010-09-10 14:50:10 -0400 |
---|---|---|
committer | Jens Axboe <axboe@carl.home.kernel.dk> | 2010-09-10 14:50:10 -0400 |
commit | 13f05c8d8e98bbdce89158bfdb2e380940695a88 (patch) | |
tree | 055215e7e2b1bdc684ead64daa61b30b35eaa3c5 /include/linux/bio.h | |
parent | c8bf1336824ebd698d37b71763e1c43190f2229a (diff) |
block/scsi: Provide a limit on the number of integrity segments
Some controllers have a hardware limit on the number of protection
information scatter-gather list segments they can handle.
Introduce a max_integrity_segments limit in the block layer and provide
a new scsi_host_template setting that allows HBA drivers to provide a
value suitable for the hardware.
Add support for honoring the integrity segment limit when merging both
bios and requests.
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jens Axboe <axboe@carl.home.kernel.dk>
Diffstat (limited to 'include/linux/bio.h')
-rw-r--r-- | include/linux/bio.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/bio.h b/include/linux/bio.h index 5274103434ad..2c3fd7421607 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
@@ -496,6 +496,10 @@ static inline struct bio *bio_list_get(struct bio_list *bl) | |||
496 | #define bip_for_each_vec(bvl, bip, i) \ | 496 | #define bip_for_each_vec(bvl, bip, i) \ |
497 | __bip_for_each_vec(bvl, bip, i, (bip)->bip_idx) | 497 | __bip_for_each_vec(bvl, bip, i, (bip)->bip_idx) |
498 | 498 | ||
499 | #define bio_for_each_integrity_vec(_bvl, _bio, _iter) \ | ||
500 | for_each_bio(_bio) \ | ||
501 | bip_for_each_vec(_bvl, _bio->bi_integrity, _iter) | ||
502 | |||
499 | #define bio_integrity(bio) (bio->bi_integrity != NULL) | 503 | #define bio_integrity(bio) (bio->bi_integrity != NULL) |
500 | 504 | ||
501 | extern struct bio_integrity_payload *bio_integrity_alloc_bioset(struct bio *, gfp_t, unsigned int, struct bio_set *); | 505 | extern struct bio_integrity_payload *bio_integrity_alloc_bioset(struct bio *, gfp_t, unsigned int, struct bio_set *); |