Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > fc11cd6e1c513a17304da94a5390f3cd > files > 3314

kernel-2.6.18-194.11.1.el5.src.rpm

From: mchristi@redhat.com <mchristi@redhat.com>
Date: Mon, 6 Apr 2009 16:02:00 -0500
Subject: [scsi] aic7xxx: increase max IO size
Message-id: 1239051720-1520-1-git-send-email-mchristi@redhat.com
O-Subject: [PATCH 1/1] [RHEL 5.4] aic7xxx: increase max IO size
Bugzilla: 493448
RH-Acked-by: Rik van Riel <riel@redhat.com>
RH-Acked-by: Rob Evers <revers@redhat.com>

From: Mike Christie <mchristi@redhat.com>

This is for BZ 493448.

aic7xxx does not set its max_sectors limit, so the scsi layer
assigns it the default 1024. This is Ok for FS IO and direct IO
through the block layer, but for tape and SG IO type of pass
through commands it can be a little small.

According to the upstream commit
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=80f1443c66de3ec42e28d151bd43a80de398877e
the aic7xxx driver can support IO sizes up to 4 MB, so this patch
ports that upstream commit to our kernel.

Patch was tested with a tape driver by the user.

I did some basic tests here. I used used some tools from sg_utils to try
out large SG IO passthrough commands. I also did some FS tests with
bonnie++ to check for regressions in that path.

diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c b/drivers/scsi/aic7xxx/aic79xx_osm.c
index 07d51b8..575aacb 100644
--- a/drivers/scsi/aic7xxx/aic79xx_osm.c
+++ b/drivers/scsi/aic7xxx/aic79xx_osm.c
@@ -773,6 +773,7 @@ struct scsi_host_template aic79xx_driver_template = {
 #endif
 	.can_queue		= AHD_MAX_QUEUE,
 	.this_id		= -1,
+	.max_sectors		= 8192,
 	.cmd_per_lun		= 2,
 	.use_clustering		= ENABLE_CLUSTERING,
 	.slave_alloc		= ahd_linux_slave_alloc,
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c
index b3d35b3..b38e9dc 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_osm.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c
@@ -777,6 +777,7 @@ struct scsi_host_template aic7xxx_driver_template = {
 #endif
 	.can_queue		= AHC_MAX_QUEUE,
 	.this_id		= -1,
+	.max_sectors		= 8192,
 	.cmd_per_lun		= 2,
 	.use_clustering		= ENABLE_CLUSTERING,
 	.slave_alloc		= ahc_linux_slave_alloc,