[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-stable] [PULL 4/7] block/iscsi: fix deadlock on scsi check conditi
From: |
Paolo Bonzini |
Subject: |
[Qemu-stable] [PULL 4/7] block/iscsi: fix deadlock on scsi check condition |
Date: |
Thu, 27 Feb 2014 17:55:23 +0100 |
From: Peter Lieven <address@hidden>
the retry logic was broken because the complete status
of the task structure was not reset. this resulted in
an infinite loop retrying the command over and over.
CC: address@hidden
Signed-off-by: Peter Lieven <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
block/iscsi.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/block/iscsi.c b/block/iscsi.c
index 41ec097..c77769c 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -145,12 +145,13 @@ iscsi_co_generic_cb(struct iscsi_context *iscsi, int
status,
if (iTask->retries-- > 0 && status == SCSI_STATUS_CHECK_CONDITION
&& task->sense.key == SCSI_SENSE_UNIT_ATTENTION) {
+ error_report("iSCSI CheckCondition: %s", iscsi_get_error(iscsi));
iTask->do_retry = 1;
goto out;
}
if (status != SCSI_STATUS_GOOD) {
- error_report("iSCSI: Failure. %s", iscsi_get_error(iscsi));
+ error_report("iSCSI Failure: %s", iscsi_get_error(iscsi));
}
out:
@@ -325,6 +326,7 @@ retry:
}
if (iTask.do_retry) {
+ iTask.complete = 0;
goto retry;
}
@@ -399,6 +401,7 @@ retry:
}
if (iTask.do_retry) {
+ iTask.complete = 0;
goto retry;
}
@@ -433,6 +436,7 @@ retry:
}
if (iTask.do_retry) {
+ iTask.complete = 0;
goto retry;
}
@@ -683,6 +687,7 @@ retry:
scsi_free_scsi_task(iTask.task);
iTask.task = NULL;
}
+ iTask.complete = 0;
goto retry;
}
@@ -767,6 +772,7 @@ retry:
}
if (iTask.do_retry) {
+ iTask.complete = 0;
goto retry;
}
@@ -836,6 +842,7 @@ retry:
}
if (iTask.do_retry) {
+ iTask.complete = 0;
goto retry;
}
--
1.8.5.3
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-stable] [PULL 4/7] block/iscsi: fix deadlock on scsi check condition,
Paolo Bonzini <=