mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-14 21:01:29 +00:00
a6a8d9f87e
Some of the storage devices (that can be accessed through multiple paths), do need some special handling for 1. Activating the passive path of the storage access. 2. Decode and handle the special sense codes returned by the devices. 3. Handle the I/Os being sent to the passive path, especially during the device probe time. when accessed through multiple paths. As of today this special device handling is done at the dm-multipath layer using dm-handlers. That works well for (1); for (2) to be handled at dm layer, scsi sense information need to be exported from SCSI to dm-layer, which is not very attractive; (3) cannot be done at all at the dm layer. Device handler has been moved to SCSI mainly to handle (2) and (3) properly. Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com> Signed-off-by: Mike Anderson <andmike@linux.vnet.ibm.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
60 lines
1.8 KiB
C
60 lines
1.8 KiB
C
/*
|
|
* Header file for SCSI device handler infrastruture.
|
|
*
|
|
* Modified version of patches posted by Mike Christie <michaelc@cs.wisc.edu>
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
* under the terms of the GNU General Public License as published by the
|
|
* Free Software Foundation; either version 2 of the License, or (at your
|
|
* option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful, but
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License along
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
*
|
|
* Copyright IBM Corporation, 2007
|
|
* Authors:
|
|
* Chandra Seetharaman <sekharan@us.ibm.com>
|
|
* Mike Anderson <andmike@linux.vnet.ibm.com>
|
|
*/
|
|
|
|
#include <scsi/scsi_device.h>
|
|
|
|
enum {
|
|
SCSI_DH_OK = 0,
|
|
/*
|
|
* device errors
|
|
*/
|
|
SCSI_DH_DEV_FAILED, /* generic device error */
|
|
SCSI_DH_DEV_TEMP_BUSY,
|
|
SCSI_DH_DEVICE_MAX, /* max device blkerr definition */
|
|
|
|
/*
|
|
* transport errors
|
|
*/
|
|
SCSI_DH_NOTCONN = SCSI_DH_DEVICE_MAX + 1,
|
|
SCSI_DH_CONN_FAILURE,
|
|
SCSI_DH_TRANSPORT_MAX, /* max transport blkerr definition */
|
|
|
|
/*
|
|
* driver and generic errors
|
|
*/
|
|
SCSI_DH_IO = SCSI_DH_TRANSPORT_MAX + 1, /* generic error */
|
|
SCSI_DH_INVALID_IO,
|
|
SCSI_DH_RETRY, /* retry the req, but not immediately */
|
|
SCSI_DH_IMM_RETRY, /* immediately retry the req */
|
|
SCSI_DH_TIMED_OUT,
|
|
SCSI_DH_RES_TEMP_UNAVAIL,
|
|
SCSI_DH_DEV_OFFLINED,
|
|
SCSI_DH_NOSYS,
|
|
SCSI_DH_DRIVER_MAX,
|
|
};
|
|
|
|
extern int scsi_dh_activate(struct request_queue *);
|
|
extern int scsi_dh_handler_exist(const char *);
|