Commit e380aff8 authored by Peter Lieven's avatar Peter Lieven Committed by Kevin Wolf
Browse files

block/iscsi: handle SCSI_STATUS_TASK_SET_FULL



a target may issue a SCSI_STATUS_TASK_SET_FULL status
if there is more than one "BUSY" command queued already.

Signed-off-by: default avatarPeter Lieven <pl@kamp.de>
Message-id: 1429193313-4263-8-git-send-email-pl@kamp.de
Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
parent 59dd0a22
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -186,10 +186,13 @@ iscsi_co_generic_cb(struct iscsi_context *iscsi, int status,
                iTask->do_retry = 1;
                goto out;
            }
            if (status == SCSI_STATUS_BUSY) {
            /* status 0x28 is SCSI_TASK_SET_FULL. It was first introduced
             * in libiscsi 1.10.0. Hardcode this value here to avoid
             * the need to bump the libiscsi requirement to 1.10.0 */
            if (status == SCSI_STATUS_BUSY || status == 0x28) {
                unsigned retry_time =
                    exp_random(iscsi_retry_times[iTask->retries - 1]);
                error_report("iSCSI Busy (retry #%u in %u ms): %s",
                error_report("iSCSI Busy/TaskSetFull (retry #%u in %u ms): %s",
                             iTask->retries, retry_time,
                             iscsi_get_error(iscsi));
                aio_timer_init(iTask->iscsilun->aio_context,