Re: [PATCH 3/3] scsi dh alua: handle report luns data changed in check sense callout

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hannes Reinecke wrote:
Hi Mike,

michaelc@xxxxxxxxxxx wrote:
From: Ilgu Hong <ilgu.hong@xxxxxxxxxxx>

When we switch controllers the Intel Multi-Flex reports
REPORTED_LUNS_DATA_HAS_CHANGED. This patch just has us
retry the command.

Signed-off-by: Ilgu Hong <ilgu.hong@xxxxxxxxxxx>
Signed-off-by: Mike Christie <michaelc@xxxxxxxxxxx>
---
 drivers/scsi/device_handler/scsi_dh_alua.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c
index 31e1df5..dba154c 100644
--- a/drivers/scsi/device_handler/scsi_dh_alua.c
+++ b/drivers/scsi/device_handler/scsi_dh_alua.c
@@ -461,6 +461,15 @@ static int alua_check_sense(struct scsi_device *sdev,
              */
             return ADD_TO_MLQUEUE;
         }
+        if (sense_hdr->asc == 0x3f && sense_hdr->ascq == 0x0e) {
+            /*
+             * REPORTED_LUNS_DATA_HAS_CHANGED is reported
+             * when switching controllers on targets like
+             * Intel Multi-Flex. We can just retry.
+             */
+            return ADD_TO_MLQUEUE;
+        }
+
         break;
     }
Hmm. We could as well always retry for Unit Attention; it's meant to be
a temporary condition anyway so no harm in retrying.


Hey, do you mean you want me to just do

case UNIT_ATTENTION:
	return ADD_TO_MLQUEUE;


? In scsi_error.c:scsi_check_sense we fail for

                /*
                 * if the device is not started, we need to wake
                 * the error handler to start the motor
                 */
                if (scmd->device->allow_restart &&
                    (sshdr.asc == 0x04) && (sshdr.ascq == 0x02))
                        return FAILED;
and in scsi_lib.c:scsi_io_compeltion we fail for

                        if (cmd->device->removable) {
                                /* Detected disc change.  Set a bit
                                 * and quietly refuse further access.
                                 */
                                cmd->device->changed = 1;
                                scsi_end_request(cmd, -EIO, this_count, 1);
                                return;
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux