* RE: ServeRAID Seeing DADSI Devices
@ 2006-02-01 16:00 Hammer, Jack
0 siblings, 0 replies; 3+ messages in thread
From: Hammer, Jack @ 2006-02-01 16:00 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-scsi, James.Bottomley
I believe this is a bad solution. If exposing an element of a RAID array
( at any level ), now or ever in the future, allows anyone or anything
the ability to touch the physical DASDI device, it has violated the most
sacred rule of a RAID subsystem because it has jeopardized the data's
integrity. Nothing should ever have the ability to touch a drive's data
( attached to a RAID adapter ) except the adapter's firmware.
That being said ( and soapbox dismounted ), I will create a patch that
sets the no_uld_attach flag - if that's the implementation the community
thinks is appropriate.
Jack
-----Original Message-----
From: Christoph Hellwig [mailto:hch@infradead.org]
Sent: Wednesday, February 01, 2006 5:25 AM
To: Hammer, Jack
Cc: linux-scsi@vger.kernel.org; James.Bottomley@steeleye.com
Subject: Re: ServeRAID Seeing DADSI Devices
On Tue, Jan 31, 2006 at 01:17:55PM -0500, Jack Hammer wrote:
> A critical thing the ServeRAID driver MUST do is hide the physical
> DASDI devices from the OS. It does this by intercepting the INQUIRY
commands.
No, it must not. What itu should do instead is to set the no_uld_attach
flag.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ServeRAID Seeing DADSI Devices
2006-01-31 18:17 Jack Hammer
@ 2006-02-01 10:25 ` Christoph Hellwig
0 siblings, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2006-02-01 10:25 UTC (permalink / raw)
To: Jack Hammer; +Cc: linux-scsi, James.Bottomley
On Tue, Jan 31, 2006 at 01:17:55PM -0500, Jack Hammer wrote:
> A critical thing the ServeRAID driver MUST do is hide the physical DASDI
> devices from the OS. It does this by intercepting the INQUIRY commands.
No, it must not. What itu should do instead is to set the no_uld_attach flag.
^ permalink raw reply [flat|nested] 3+ messages in thread
* ServeRAID Seeing DADSI Devices
@ 2006-01-31 18:17 Jack Hammer
2006-02-01 10:25 ` Christoph Hellwig
0 siblings, 1 reply; 3+ messages in thread
From: Jack Hammer @ 2006-01-31 18:17 UTC (permalink / raw)
To: linux-scsi, James.Bottomley
A critical thing the ServeRAID driver MUST do is hide the physical DASDI
devices from the OS. It does this by intercepting the INQUIRY commands.
In recent 2.6.15 testing, I discovered this to be failing.
The cause was the driver assuming that the INQUIRY response data was in a
simple single buffer, when it was actually a 1 element scatter gather list.
This patch makes ips always look at the correct data when examining an
INQUIRY response.
Signed-off-by: Jack Hammer <jack_hammer@adaptec.com>
--- a/drivers/scsi/ips.c Mon Jan 30 13:34:41 2006
+++ b/drivers/scsi/ips.c Mon Jan 30 13:47:00 2006
@@ -3496,6 +3496,7 @@
int device_error;
uint32_t transfer_len;
IPS_DCDB_TABLE_TAPE *tapeDCDB;
+ IPS_SCSI_INQ_DATA inquiryData;
METHOD_TRACE("ips_map_status", 1);
@@ -3554,13 +3555,13 @@
errcode = DID_OK;
/* Restrict access to physical DASD */
- if ((scb->scsi_cmd->cmnd[0] == INQUIRY) &&
- ((((char *) scb->scsi_cmd->
- buffer)[0] & 0x1f) == TYPE_DISK)) {
- /* underflow -- no error */
- /* restrict access to physical DASD */
- errcode = DID_TIME_OUT;
- break;
+ if (scb->scsi_cmd->cmnd[0] == INQUIRY) {
+ ips_scmd_buf_read(scb->scsi_cmd,
+ &inquiryData, sizeof (inquiryData));
+ if ((inquiryData.DeviceType & 0x1f) == TYPE_DISK) {
+ errcode = DID_TIME_OUT;
+ break;
+ }
}
} else
errcode = DID_ERROR;
@@ -4132,6 +4133,7 @@
uint8_t basic_status;
uint8_t ext_status;
int errcode;
+ IPS_SCSI_INQ_DATA inquiryData;
METHOD_TRACE("ips_chkstatus", 1);
@@ -4252,11 +4254,11 @@
scb->scsi_cmd->result = errcode << 16;
} else { /* bus == 0 */
/* restrict access to physical drives */
- if ((scb->scsi_cmd->cmnd[0] == INQUIRY) &&
- ((((char *) scb->scsi_cmd->buffer)[0] & 0x1f) ==
- TYPE_DISK)) {
-
- scb->scsi_cmd->result = DID_TIME_OUT << 16;
+ if (scb->scsi_cmd->cmnd[0] == INQUIRY) {
+ ips_scmd_buf_read(scb->scsi_cmd,
+ &inquiryData, sizeof (inquiryData));
+ if ((inquiryData.DeviceType & 0x1f) == TYPE_DISK)
+ scb->scsi_cmd->result = DID_TIME_OUT << 16;
}
} /* else */
} else { /* recovered error / success */
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-02-01 16:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-01 16:00 ServeRAID Seeing DADSI Devices Hammer, Jack
-- strict thread matches above, loose matches on Subject: below --
2006-01-31 18:17 Jack Hammer
2006-02-01 10:25 ` Christoph Hellwig
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.