Re: [PATCHv4 09/12] mpt3sas: simplify task management functions

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

 



On 03/06/2017 06:16 AM, Sreekanth Reddy wrote:
> I feel that using these flags are not working as expected. From the
> driver's prospective it should return status of the TM based on
> whether it has cleared reference of the timed out IO in the driver or
> not (i.e. if it is successfully able to clear the reference (i.e.
> cleared from scsi lookup) of the timed out IO from driver, firmware
> then return success status otherwise return failure status). It should
> not check for it's above layer reference.
> 
Looking into it you are actually right.

The SCSI midlayer will only decrease a 'device_busy' and the like if the
commands are completed, ie after ->scsi_done() has been called.
But the whole point of the error handler OTOH is that ->scsi_done() is
_not_ called, but rather the commands are left alone until SCSI EH
completed, and only _then_ calling ->scsi_done().

Hence 'device_busy' et al trivially can never be zero while SCSI EH is
running.

I'll be rewriting that for the next submission.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@xxxxxxx			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)



[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