Re: [PATCH 02/18] fnic: use scsi_host_busy_iter() to traverse commands
From: Hannes Reinecke <hare@suse.de>
Date: 2021-05-04 12:53:51
On 5/4/21 11:50 AM, Christoph Hellwig wrote:
On Mon, May 03, 2021 at 05:03:17PM +0200, Hannes Reinecke wrote:quoted
Use scsi_host_busy_iter() to traverse commands instead of hand-crafted routines walking the command list.While the replacement looks like the right thing to do at the micro level, can we take one step back? Shouldn't completing commands be left entirely to the SCSI EH code instead of messing with it in the driver?
Not sure if that'd be easily possible. Most drivers operate under the assumption that upon return from eh_device_reset_handler() all commands for that device (except for the reset command itself and the command inducing the reset) will have to be aborted or completed. As the call is synchronous, the LLDDs have to _wait_ for completion to happen (which, incidentally, is the cause for most of the issues we're having with SCSI EH...), and only then can they return from the callback. So I can't see how we could delegate this to SCSI EH, as this would mean a break with the current behaviour. Mind you, I would _love_ to be able to do an asynchronous device reset, seeing that we had _really_ good experience with the asynchronous command abort, but that will be an incompatible change. Cheers, Hannes -- Dr. Hannes Reinecke Kernel Storage Architect hare@suse.de +49 911 74053 688 SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer