Re: [PATCH 2/2] scsi: set timed out out mq requests to complete

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

 



On Thu, 2018-07-19 at 15:26 -0600, Keith Busch wrote:
+AD4- diff --git a/drivers/scsi/scsi+AF8-error.c b/drivers/scsi/scsi+AF8-error.c
+AD4- index 8932ae81a15a..86ee10b2c775 100644
+AD4- --- a/drivers/scsi/scsi+AF8-error.c
+AD4- +-+-+- b/drivers/scsi/scsi+AF8-error.c
+AD4- +AEAAQA- -286,6 +-286,9 +AEAAQA- enum blk+AF8-eh+AF8-timer+AF8-return scsi+AF8-times+AF8-out(struct request +ACo-req)
+AD4-  	enum blk+AF8-eh+AF8-timer+AF8-return rtn +AD0- BLK+AF8-EH+AF8-DONE+ADs-
+AD4-  	struct Scsi+AF8-Host +ACo-host +AD0- scmd-+AD4-device-+AD4-host+ADs-
+AD4-  
+AD4- +-	if (req-+AD4-q-+AD4-mq+AF8-ops +ACYAJg- blk+AF8-mq+AF8-mark+AF8-complete(req))
+AD4- +-		return rtn+ADs-
+AD4- +-
+AD4-  	trace+AF8-scsi+AF8-dispatch+AF8-cmd+AF8-timeout(scmd)+ADs-
+AD4-  	scsi+AF8-log+AF8-completion(scmd, TIMEOUT+AF8-ERROR)+ADs-
+AD4-  
+AD4- +AEAAQA- -300,7 +-303,8 +AEAAQA- enum blk+AF8-eh+AF8-timer+AF8-return scsi+AF8-times+AF8-out(struct request +ACo-req)
+AD4-  			set+AF8-host+AF8-byte(scmd, DID+AF8-TIME+AF8-OUT)+ADs-
+AD4-  			scsi+AF8-eh+AF8-scmd+AF8-add(scmd)+ADs-
+AD4-  		+AH0-
+AD4- -	+AH0-
+AD4- +-	+AH0- else if (req-+AD4-q-+AD4-mq+AF8-ops)
+AD4- +-		WRITE+AF8-ONCE(req-+AD4-state, MQ+AF8-RQ+AF8-IN+AF8-FLIGHT)+ADs-
+AD4-  
+AD4-  	return rtn+ADs-
+AD4-  +AH0-

Modifying the completion state and req-+AD4-state from the SCSI core are layering
violations. Have you considered to move the above changes into blk+AF8-mq+AF8-rq+AF8-timed+AF8-out()?
An additional benefit of that approach is that the req-+AD4-q-+AD4-mq+AF8-ops checks can be
left out.

Thanks,

Bart.



[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