On Wed, 2019-03-13 at 23:52 -0400, Douglas Gilbert wrote: > On 2019-03-13 10:39 p.m., Bart Van Assche wrote: > > On 3/13/19 6:32 PM, Douglas Gilbert wrote: > > > I agree that scsi_ioctl_reset() should be taught how to produce a request > > > that doesn't blow up intermediate code expecting all requests to be well > > > made with respect to mq. > > > > Hi Doug, > > > > Do you perhaps have a proposal for how to do that without allocating a new > > request from the error handler and without reserving a request for error > > handling purposes. > > Well yes. The SCSI ML could tell the block layer that the LU/device > was unavailable (temporarily) and then the ML would communicate > directly with the LLD. A block layer/mq bypass ... > > Probably don't like that one. Why rule out reserving a request (e.g. one > per host)?
The lowest supported queue depth is one so we reserving a request may break some SCSI LLDs. Additionally, reserving one request may have a performance impact. BTW, it is not clear to me why a struct scsi_cmnd pointer is passed to the eh_*_reset_handler() callbacks. Has it ever been considered to pass a struct scsi_device pointer to these callback functions instead? In other words, are there any eh_*_reset_handler() callbacks that use more information from struct scsi_cmnd than the device pointer? Bart.