Commit c80aeb79 authored by Hannes Reinecke's avatar Hannes Reinecke Committed by Kamal Mostafa

scsi_dh_alua: call alua_rtpg() if stpg fails

If the call to SET TARGET PORT GROUPS fails we have no idea what
state the array is left in, so we need to issue a call to
REPORT TARGET PORT GROUPS in these cases.
Reviewed-by: default avatarBart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarHannes Reinecke <hare@suse.de>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>

BugLink: http://bugs.launchpad.net/bugs/1567602

(cherry-picked from commit dd5cc408)
Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
Acked-by: default avatarBrad Figg <brad.figg@canonical.com>
Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
parent 150402e1
......@@ -674,6 +674,8 @@ static int alua_activate(struct scsi_device *sdev,
h->flags |= ALUA_OPTIMIZE_STPG;
err = alua_stpg(sdev, h);
if (err == SCSI_DH_RETRY)
err = alua_rtpg(sdev, h, 1);
out:
if (fn)
fn(data, 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