diff options
author | Rajashekhara, Mahesh <Mahesh_Rajashekhara@adaptec.com> | 2010-05-10 04:29:25 -0700 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-05-16 22:58:27 -0400 |
commit | 9cccde93fed1ca988eb2fb17ab9194bf7b5ed1b0 (patch) | |
tree | ec928f9197c24c147ac6ac51ba981c9ca027ca77 /drivers/scsi/aacraid/commsup.c | |
parent | da3cc679b247a22efe0746d129074015b278e64d (diff) | |
download | blackbird-op-linux-9cccde93fed1ca988eb2fb17ab9194bf7b5ed1b0.tar.gz blackbird-op-linux-9cccde93fed1ca988eb2fb17ab9194bf7b5ed1b0.zip |
[SCSI] aacraid: add an ifdef'd device delete case instead of taking the device offline
Problem description:
--------------------
The problem reported by one of the customer was when a logical array
is deleted(from the SDK, from the GUI, from arcconf) then the
corresponding physical device (/dev/sdb, for example) is not removed
from the Linux namespace. So you end up with a "dead" device
entry. And some of the linux tools go slightly wonky.
Solution:
---------
Based on the notification from FW, the driver calls
"scsi_remove_device" for the DELETED drive. This call not only informs
the scsi device status to the SCSI mid layer and also it will remove
corresponding scsi device entries from the Linux sysfs.
Signed-off-by: Mahesh Rajashekhara <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/aacraid/commsup.c')
-rw-r--r-- | drivers/scsi/aacraid/commsup.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c index 69692b050e3c..70079146e203 100644 --- a/drivers/scsi/aacraid/commsup.c +++ b/drivers/scsi/aacraid/commsup.c @@ -1133,6 +1133,9 @@ retry_next: if (device) { switch (device_config_needed) { case DELETE: +#if (defined(AAC_DEBUG_INSTRUMENT_AIF_DELETE)) + scsi_remove_device(device); +#else if (scsi_device_online(device)) { scsi_device_set_state(device, SDEV_OFFLINE); sdev_printk(KERN_INFO, device, @@ -1141,6 +1144,7 @@ retry_next: "array deleted" : "enclosure services event"); } +#endif break; case ADD: if (!scsi_device_online(device)) { @@ -1155,12 +1159,16 @@ retry_next: case CHANGE: if ((channel == CONTAINER_CHANNEL) && (!dev->fsa_dev[container].valid)) { +#if (defined(AAC_DEBUG_INSTRUMENT_AIF_DELETE)) + scsi_remove_device(device); +#else if (!scsi_device_online(device)) break; scsi_device_set_state(device, SDEV_OFFLINE); sdev_printk(KERN_INFO, device, "Device offlined - %s\n", "array failed"); +#endif break; } scsi_rescan_device(&device->sdev_gendev); |