From d5c5fb83afab255db2bf12a319739944dffe11c7 Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Thu, 21 Mar 2013 19:26:55 -0700 Subject: [PATCH] We should still be able to login even if the device is reserved. TESTUNITREADY returning reservation conflict is no reason to fail the login --- lib/connect.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/connect.c b/lib/connect.c index 7429496..4f04636 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -77,6 +77,11 @@ iscsi_testunitready_cb(struct iscsi_context *iscsi, int status, status = 0; } + /* Dont fail the login just because the medium is reserved */ + if (status == SCSI_STATUS_RESERVATION_CONFLICT) { + status = 0; + } + ct->cb(iscsi, status?SCSI_STATUS_ERROR:SCSI_STATUS_GOOD, NULL, ct->private_data); scsi_free_scsi_task(task);