From f27b1f9cc3d99aedf6d14bd596f19b4caac4fb22 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Mon, 22 Feb 2016 04:13:53 +0000 Subject: [PATCH] scst_tg: Restore Linux and ESXi interoperability Linux and ESXi expect that target ports in one of the ALUA states standby or unavailable are able to process commands like TEST UNIT READY, READ CAPACITY, RESERVE and RELEASE. This patch partially reverts r6802. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6813 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/dev_handlers/scst_vdisk.c | 1 + scst/src/scst_tg.c | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index 80aad71aa..fb9c64ec6 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -3547,6 +3547,7 @@ static bool vdisk_no_fd_allowed_commands(const struct scst_cmd *cmd) switch (cmd->cdb[0]) { case TEST_UNIT_READY: + case GET_EVENT_STATUS_NOTIFICATION: case INQUIRY: case MODE_SENSE: case MODE_SENSE_10: diff --git a/scst/src/scst_tg.c b/scst/src/scst_tg.c index b610fa6f9..ba3567ba0 100644 --- a/scst/src/scst_tg.c +++ b/scst/src/scst_tg.c @@ -283,6 +283,8 @@ static int scst_tg_accept_standby(struct scst_cmd *cmd) TRACE_ENTRY(); switch (cmd->cdb[0]) { + case TEST_UNIT_READY: + case GET_EVENT_STATUS_NOTIFICATION: case INQUIRY: case MODE_SENSE: case MODE_SENSE_10: @@ -346,10 +348,18 @@ static int scst_tg_accept_unav(struct scst_cmd *cmd) TRACE_ENTRY(); switch (cmd->cdb[0]) { + case TEST_UNIT_READY: + case GET_EVENT_STATUS_NOTIFICATION: case INQUIRY: + case MODE_SENSE: + case MODE_SENSE_10: case READ_CAPACITY: case REPORT_LUNS: case REQUEST_SENSE: + case RELEASE: + case RELEASE_10: + case RESERVE: + case RESERVE_10: case READ_BUFFER: case WRITE_BUFFER: res = SCST_ALUA_CHECK_OK;