From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49530) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YikWT-0004PH-6x for qemu-devel@nongnu.org; Thu, 16 Apr 2015 10:12:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YikWP-0006oD-Go for qemu-devel@nongnu.org; Thu, 16 Apr 2015 10:12:05 -0400 Received: from mx-v6.kamp.de ([2a02:248:0:51::16]:53226 helo=mx01.kamp.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YikWP-0006nj-4C for qemu-devel@nongnu.org; Thu, 16 Apr 2015 10:12:01 -0400 From: Peter Lieven Date: Thu, 16 Apr 2015 16:08:31 +0200 Message-Id: <1429193313-4263-8-git-send-email-pl@kamp.de> In-Reply-To: <1429193313-4263-1-git-send-email-pl@kamp.de> References: <1429193313-4263-1-git-send-email-pl@kamp.de> Subject: [Qemu-devel] [PATCH for-2.4 V2 7/9] block/iscsi: handle SCSI_STATUS_TASK_SET_FULL List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, Peter Lieven , ronniesahlberg@gmail.com, qemu-block@nongnu.org a target may issue a SCSI_STATUS_TASK_SET_FULL status if there is more than one "BUSY" command queued already. Signed-off-by: Peter Lieven --- block/iscsi.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/block/iscsi.c b/block/iscsi.c index 5999f74..328907b 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -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, -- 1.9.1