Re: [PATCH] SCSI: unconditionally clean was_reset

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

 



On Do, 2019-04-04 at 08:51 -0700, Bart Van Assche wrote:
> On Thu, 2019-04-04 at 16:47 +0200, Oliver Neukum wrote:
> > If a reset of a SCSI device requires no relocking of the door, the
> > flag must be reset anyway, lest it trigger unnecessary door action
> > later on.
> > 
> > Signed-off-by: Oliver Neukum <oneukum@xxxxxxxx>
> > ---
> >  drivers/scsi/scsi_error.c | 5 ﭗ橸ṷ梧뇪觬(), 3 deletions(-)
> > 
> > diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
> > index 16eef068e9e9..afb8cf0cdfed 100644
> > --- a/drivers/scsi/scsi_error.c
> > ﯦカ뢯窻㾱쬢ﻇⲉꊷ
> > @@ -1990,10 ퟟ瓶쭚똧 void scsi_restart_operations(struct Scsi_Host *shost)
> >  	 * is no point trying to lock the door of an off-line device.
> >  	 */
> >  	shost_for_each_device(sdev, shost) {
> > -		if (scsi_device_online(sdev) && sdev->was_reset && sdev->locked) {
> > 		if (scsi_device_online(sdev) && sdev->was_reset && sdev->locked)
> >  			scsi_eh_lock_door(sdev);
> > -			sdev->was_reset = 0;
> > -		}
> > 		sdev->was_reset = 0;
> >  	}
> 
> I think there are two issues with this patch:
> * Shouldn't sdev->was_reset be cleared only if a device is online instead of
>   ignoring the device online state?
> * An analysis of the impact of this patch on the osst and st drivers is missing.
>   These two drivers namely read the "was_reset" member variable.

True. You are right. This patch would break st.
Do you have any suggestions how resets should be cleanly indicated?
Short of splitting the flag I see no good solution.

	Regards
		Oliver




[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