]> git.baikalelectronics.ru Git - kernel.git/commit
SG: work with the SCSI fixed maximum allocations.
authorJames Bottomley <James.Bottomley@HansenPartnership.com>
Sun, 13 Jan 2008 20:15:28 +0000 (14:15 -0600)
committerJens Axboe <jens.axboe@oracle.com>
Mon, 28 Jan 2008 09:54:49 +0000 (10:54 +0100)
commit78d7cba5995c73071654431c8d76ee36360de2d7
treed6257751445618b827c3e41e5b8fde2704c9d716
parent79a349027ba799c2c93459f40efb57450ae29397
SG: work with the SCSI fixed maximum allocations.

SCSI sg table allocation has a maximum size (of SCSI_MAX_SG_SEGMENTS,
currently 128) and this will cause a BUG_ON() in SCSI if something
tries an allocation over it.  This patch adds a size limit to the
chaining allocator to allow the specification of the maximum
allocation size for chaining, so we always chain in units of the
maximum SCSI allocation size.

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
drivers/scsi/scsi_lib.c
include/linux/scatterlist.h
lib/scatterlist.c