reconnect: do not queue TESTUNIT_READY cdbs
those are part of the login process to consume UNIT_ATTENTIONS. Its questionable if we should consume them at all, but iff we change that behaviour we should do it for the initial login as well as for a reconnect. Signed-off-by: Peter Lieven <pl@kamp.de>
This commit is contained in:
@@ -130,7 +130,7 @@ iscsi_login_cb(struct iscsi_context *iscsi, int status, void *command_data _U_,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ct->lun != -1 && !iscsi->old_iscsi) {
|
if (ct->lun != -1) {
|
||||||
if (iscsi_testunitready_task(iscsi, ct->lun,
|
if (iscsi_testunitready_task(iscsi, ct->lun,
|
||||||
iscsi_testunitready_cb, ct) == NULL) {
|
iscsi_testunitready_cb, ct) == NULL) {
|
||||||
iscsi_set_error(iscsi, "iscsi_testunitready_async failed.");
|
iscsi_set_error(iscsi, "iscsi_testunitready_async failed.");
|
||||||
|
|||||||
@@ -206,7 +206,8 @@ iscsi_scsi_command_async(struct iscsi_context *iscsi, int lun,
|
|||||||
struct iscsi_pdu *pdu;
|
struct iscsi_pdu *pdu;
|
||||||
int flags;
|
int flags;
|
||||||
|
|
||||||
if (iscsi->old_iscsi) {
|
if (iscsi->old_iscsi &&
|
||||||
|
(iscsi->is_loggedin == 0 || task->cdb[0] != SCSI_OPCODE_TESTUNITREADY)) {
|
||||||
iscsi = iscsi->old_iscsi;
|
iscsi = iscsi->old_iscsi;
|
||||||
ISCSI_LOG(iscsi, 2, "iscsi_scsi_command_async: queuing cmd to old_iscsi while reconnecting");
|
ISCSI_LOG(iscsi, 2, "iscsi_scsi_command_async: queuing cmd to old_iscsi while reconnecting");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user