From 49698e0322a1d87cb7c54793a132d591f4162f22 Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Sun, 21 Jul 2013 14:04:41 -0700 Subject: [PATCH] Dont fail the login just because a sanitize is in progress --- lib/connect.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/connect.c b/lib/connect.c index 3976d5a..7790253 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -83,6 +83,13 @@ iscsi_testunitready_cb(struct iscsi_context *iscsi, int status, status = 0; } + /* Dont fail the login just because there is a sanitize in progress */ + if (status != 0 + && task->sense.key == SCSI_SENSE_NOT_READY + && task->sense.ascq == SCSI_SENSE_ASCQ_SANITIZE_IN_PROGRESS) { + status = 0; + } + ct->cb(iscsi, status?SCSI_STATUS_ERROR:SCSI_STATUS_GOOD, NULL, ct->private_data); scsi_free_scsi_task(task);