Commit 0323375c authored by Hannes Reinecke's avatar Hannes Reinecke Committed by Martin K. Petersen

scsi_dh_emc: update 'access_state' field

Update the 'access_state' field of the SCSI device whenever the path
state changes.
Signed-off-by: default avatarHannes Reinecke <hare@suse.de>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 1a5dc166
...@@ -199,7 +199,12 @@ static int parse_sp_info_reply(struct scsi_device *sdev, ...@@ -199,7 +199,12 @@ static int parse_sp_info_reply(struct scsi_device *sdev,
csdev->lun_state = csdev->buffer[4]; csdev->lun_state = csdev->buffer[4];
csdev->current_sp = csdev->buffer[8]; csdev->current_sp = csdev->buffer[8];
csdev->port = csdev->buffer[7]; csdev->port = csdev->buffer[7];
if (csdev->lun_state == CLARIION_LUN_OWNED)
sdev->access_state = SCSI_ACCESS_STATE_OPTIMAL;
else
sdev->access_state = SCSI_ACCESS_STATE_STANDBY;
if (csdev->default_sp == csdev->current_sp)
sdev->access_state |= SCSI_ACCESS_STATE_PREFERRED;
out: out:
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment