block/scsi: Provide a limit on the number of integrity segments
authorMartin K. Petersen <martin.petersen@oracle.com>
Fri, 10 Sep 2010 18:50:10 +0000 (20:50 +0200)
committerJens Axboe <axboe@carl.home.kernel.dk>
Fri, 10 Sep 2010 18:50:10 +0000 (20:50 +0200)
commit13f05c8d8e98bbdce89158bfdb2e380940695a88
tree055215e7e2b1bdc684ead64daa61b30b35eaa3c5
parentc8bf1336824ebd698d37b71763e1c43190f2229a
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>
12 files changed:
block/blk-integrity.c
block/blk-merge.c
block/blk-settings.c
block/blk-sysfs.c
block/blk.h
drivers/scsi/hosts.c
drivers/scsi/scsi_lib.c
drivers/scsi/scsi_sysfs.c
include/linux/bio.h
include/linux/blkdev.h
include/scsi/scsi.h
include/scsi/scsi_host.h