From ace1b0bb0d52a6538118bd6fb10fc3c32e043820 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 4 Nov 2018 02:14:22 +0000 Subject: [PATCH] Merge r7345 from trunk git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.3.x@7606 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_lib.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index b6b5f4a01..3ee33f4bf 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -6758,6 +6758,14 @@ int scst_cmp_wr_local(struct scst_cmd *cmd) TRACE_ENTRY(); + if (cmd->sess->sess_mq) { + PRINT_WARNING_ONCE("MQ session (%p) from initiator %s (tgt %s), " + "COMPARE AND WRITE not supported", cmd->sess, + cmd->sess->initiator_name, cmd->sess->tgt->tgt_name); + scst_set_cmd_error(cmd, SCST_LOAD_SENSE(scst_sense_invalid_opcode)); + goto out_done; + } + /* COMPARE AND WRITE is SBC only command */ EXTRACHECKS_BUG_ON(cmd->dev->type != TYPE_DISK);