From a49868a2e145bd6a1bc4e0ca93aea78aa5e635d8 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Sat, 16 Apr 2011 15:24:43 +0000 Subject: [PATCH] Possibility to trace reservation conflicts added git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3386 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_lib.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index 3f1b11ec3..0c614f781 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -796,6 +796,13 @@ int scst_set_cmd_error_status(struct scst_cmd *cmd, int status) TRACE_ENTRY(); + if (status == SAM_STAT_RESERVATION_CONFLICT) { + TRACE(TRACE_SCSI|TRACE_MINOR, "Reservation conflict (dev %s, " + "initiator %s, tgt_id %d)", + cmd->dev ? cmd->dev->virt_name : NULL, + cmd->sess->initiator_name, cmd->tgt->rel_tgt_id); + } + if (cmd->status != 0) { TRACE_MGMT_DBG("cmd %p already has status %x set", cmd, cmd->status);