scsi_dh: add 'rescan' callback
If a device needs to be rescanned the device_handler might need to be rechecked, too. So add a 'rescan' callback to the device handler and call it upon scsi_rescan_device(). The rescan callback will be invoked from the Unit Attention handling of ASC/ASCQ 3F 03 (INQUIRY DATA HAS CHANGED). Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:

کامیت شده توسط
Martin K. Petersen

والد
9d2c303952
کامیت
d3d328919f
@@ -1026,6 +1026,13 @@ static int alua_prep_fn(struct scsi_device *sdev, struct request *req)
|
||||
|
||||
}
|
||||
|
||||
static void alua_rescan(struct scsi_device *sdev)
|
||||
{
|
||||
struct alua_dh_data *h = sdev->handler_data;
|
||||
|
||||
alua_initialize(sdev, h);
|
||||
}
|
||||
|
||||
/*
|
||||
* alua_bus_attach - Attach device handler
|
||||
* @sdev: device to be attached to
|
||||
@@ -1086,6 +1093,7 @@ static struct scsi_device_handler alua_dh = {
|
||||
.prep_fn = alua_prep_fn,
|
||||
.check_sense = alua_check_sense,
|
||||
.activate = alua_activate,
|
||||
.rescan = alua_rescan,
|
||||
.set_params = alua_set_params,
|
||||
};
|
||||
|
||||
|
مرجع در شماره جدید
Block a user