RE: [PATCH 4/4] fusion: do not check serial_number in the abort handler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: James Bottomley [mailto:James.Bottomley@xxxxxxxxxxxxxxxxxxxxx]
> Sent: Wednesday, May 25, 2011 8:49 PM
> To: Desai, Kashyap
> Cc: Christoph Hellwig; James.Bottomley@xxxxxxx; linux-
> scsi@xxxxxxxxxxxxxxx; Moore, Eric
> Subject: RE: [PATCH 4/4] fusion: do not check serial_number in the
> abort handler
> 
> On Wed, 2011-05-25 at 19:11 +0530, Desai, Kashyap wrote:
> > > -----Original Message-----
> > > From: linux-scsi-owner@xxxxxxxxxxxxxxx [mailto:linux-scsi-
> > > owner@xxxxxxxxxxxxxxx] On Behalf Of Christoph Hellwig
> > > Sent: Monday, April 04, 2011 7:13 PM
> > > To: James.Bottomley@xxxxxxx
> > > Cc: linux-scsi@xxxxxxxxxxxxxxx; Moore, Eric
> > > Subject: [PATCH 4/4] fusion: do not check serial_number in the
> abort
> > > handler
> > >
> > > The SCSI midlayer stops all command processing when in error
> handling,
> > > which
> > > means there is no chance for command reuse when the abort handler
> is
> > > called.
> > >
> > > Signed-off-by: Christoph Hellwig <hch@xxxxxx>
> > >
> > > Index: linux-2.6/drivers/message/fusion/mptscsih.c
> > > ===================================================================
> > > --- linux-2.6.orig/drivers/message/fusion/mptscsih.c	2011-04-04
> > > 06:25:45.526096602 -0700
> > > +++ linux-2.6/drivers/message/fusion/mptscsih.c	2011-04-04
> > > 06:26:07.036096337 -0700
> > > @@ -1773,7 +1773,6 @@ mptscsih_abort(struct scsi_cmnd * SCpnt)
> > >  	int		 scpnt_idx;
> > >  	int		 retval;
> > >  	VirtDevice	 *vdevice;
> > > -	ulong	 	 sn = SCpnt->serial_number;
> > >  	MPT_ADAPTER	*ioc;
> > >
> > >  	/* If we can't locate our host adapter structure, return FAILED
> > > status.
> > > @@ -1859,8 +1858,7 @@ mptscsih_abort(struct scsi_cmnd * SCpnt)
> > >  			 vdevice->vtarget->id, vdevice->lun,
> > >  			 ctx2abort, mptscsih_get_tm_timeout(ioc));
> > >
> > > -	if (SCPNT_TO_LOOKUP_IDX(ioc, SCpnt) == scpnt_idx &&
> > > -	    SCpnt->serial_number == sn) {
> > > +	if (SCPNT_TO_LOOKUP_IDX(ioc, SCpnt) == scpnt_idx) {
> > >  		dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT
> > >  		    "task abort: command still in active list! (sc=%p)\n",
> > >  		    ioc->name, SCpnt));
> > > @@ -1873,9 +1871,9 @@ mptscsih_abort(struct scsi_cmnd * SCpnt)
> > >  	}
> > >
> >
> > This change looks good to me.!
> >
> > >   out:
> > > -	printk(MYIOC_s_INFO_FMT "task abort: %s (rv=%04x) (sc=%p)
> > > (sn=%ld)\n",
> > > +	printk(MYIOC_s_INFO_FMT "task abort: %s (rv=%04x) (sc=%p)\n",
> > >  	    ioc->name, ((retval == SUCCESS) ? "SUCCESS" : "FAILED"),
> > > retval,
> > > -	    SCpnt, SCpnt->serial_number);
> > > +	    SCpnt);
> >
> > Can't we keep serial_number print for debugging purpose. ?
> 
> There's no real point ... it's a useless number unrelated to anything
> else in the system (there's nothing you can really use it for in
> debugging).
> 
> Plus once all of these patches are through, we'll eliminate the serial
> number field from the host and command.

James, Yes I understand your point. I went through other threads and found my argument is not valid..Thanks for bringing this to my notice.  Consider this patch as Acked by me.
> 
> James
> 

ÿô.nlj·Ÿ®‰­†+%ŠË±é¥Šwÿº{.nlj·¥Š{±þÇ‹ø¡Ü}©ž²ÆzÚj:+v‰¨þø®w¥þŠàÞ¨è&¢)ß«a¶Úÿûz¹ÞúŽŠÝjÿŠwèf



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux