From mboxrd@z Thu Jan 1 00:00:00 1970 From: Laurence Oberman Subject: Re: [PATCH] scsi: do not print 'reservation conflict' for TEST UNIT READY Date: Mon, 12 Sep 2016 11:02:51 -0400 (EDT) Message-ID: <707905092.5648961.1473692571304.JavaMail.zimbra@redhat.com> References: <1473668453-115818-1-git-send-email-hare@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: Received: from mx4-phx2.redhat.com ([209.132.183.25]:45993 "EHLO mx4-phx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760075AbcILPDG (ORCPT ); Mon, 12 Sep 2016 11:03:06 -0400 In-Reply-To: <1473668453-115818-1-git-send-email-hare@suse.de> Sender: linux-scsi-owner@vger.kernel.org List-Id: linux-scsi@vger.kernel.org To: Hannes Reinecke Cc: "Martin K. Petersen" , Christoph Hellwig , James Bottomley , linux-scsi@vger.kernel.org, Hannes Reinecke ----- Original Message ----- > From: "Hannes Reinecke" > To: "Martin K. Petersen" > Cc: "Christoph Hellwig" , "James Bottomley" , > linux-scsi@vger.kernel.org, "Hannes Reinecke" , "Hannes Reinecke" > Sent: Monday, September 12, 2016 4:20:53 AM > Subject: [PATCH] scsi: do not print 'reservation conflict' for TEST UNIT READY > > 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 > --- > 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 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-scsi" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Looks good to me. Reviewed-by Laurence Oberman