linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi: do not print 'reservation conflict' for TEST UNIT READY
@ 2016-09-12  8:20 Hannes Reinecke
  2016-09-12 15:02 ` Laurence Oberman
  2016-09-13 14:04 ` James Bottomley
  0 siblings, 2 replies; 7+ messages in thread
From: Hannes Reinecke @ 2016-09-12  8:20 UTC (permalink / raw)
  To: Martin K. Petersen
  Cc: Christoph Hellwig, James Bottomley, linux-scsi, Hannes Reinecke,
	Hannes Reinecke

SPC-2 and SPC-3 (or later) differ in the handling of reservation
conflict for TEST UNIT READY. SPC-2 will return 'reservation conflict',
whereas SPC-3 will return GOOD status.
On a mixed system with both SPC-2 and SPC-3 targets one will
see lots of 'reservation conflict' messages from the SPC-2 system but
no messages from the SPC-3 system when eg multipath path checkers.
These messages might confuse the unsuspecting user although in fact
they just signal normal operation.
So we should not be printing out 'reservation conflict' for
TEST UNIT READY responses.

Signed-off-by: Hannes Reinecke <hare@suse.com>
---
 drivers/scsi/scsi_error.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index 106a6ad..3040fe5 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -1923,8 +1923,9 @@ int scsi_decide_disposition(struct scsi_cmnd *scmd)
 		return SUCCESS;
 
 	case RESERVATION_CONFLICT:
-		sdev_printk(KERN_INFO, scmd->device,
-			    "reservation conflict\n");
+		if (scmd->cmnd[0] != TEST_UNIT_READY)
+			sdev_printk(KERN_INFO, scmd->device,
+				    "reservation conflict\n");
 		set_host_byte(scmd, DID_NEXUS_FAILURE);
 		return SUCCESS; /* causes immediate i/o error */
 	default:
-- 
1.8.5.6


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-09-13 19:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-12  8:20 [PATCH] scsi: do not print 'reservation conflict' for TEST UNIT READY Hannes Reinecke
2016-09-12 15:02 ` Laurence Oberman
2016-09-13 14:04 ` James Bottomley
2016-09-13 14:24   ` Hannes Reinecke
2016-09-13 15:06     ` James Bottomley
2016-09-13 19:05       ` Ewan D. Milne
2016-09-13 19:20         ` James Bottomley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).