Message ID | 20231023092837.33786-1-hare@suse.de (mailing list archive) |
---|---|
Headers | show |
Series | scsi: EH rework, main part | expand |
Hey Hannes, On Mon, Oct 23, 2023 at 11:28:27AM +0200, Hannes Reinecke wrote: > Hi all, > > (taking up an old thread:) > here's now the main part of my EH rework. > It modifies the reset callbacks for SCSI EH such that > each callback (eh_host_reset_handler, eh_bus_reset_handler, > eh_target_reset_handler, eh_device_reset_handler) only > references the actual entity it needs to work on > (ie 'Scsi_Host', (scsi bus), 'scsi_target', 'scsi_device'), > and the 'struct scsi_cmnd' is dropped from the argument list. > This simplifies the handler themselves as they don't need to > exclude some 'magic' command, and we don't need to allocate > a mock 'struct scsi_cmnd' when issuing a reset via SCSI ioctl. > > The entire patchset can be found at: > > https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git > branch eh-rework.v8 This doesn't exist (yet?). I also tried to somehow get both part 2 of the preparations and this series applied on some tree, but failed. Preparations part 2 seems to be based on some form of Linus' master tree, and this on Martin's staging tree? Maybe I'm just unlucky :D
On 10/24/23 19:30, Benjamin Block wrote: > Hey Hannes, > > On Mon, Oct 23, 2023 at 11:28:27AM +0200, Hannes Reinecke wrote: >> Hi all, >> >> (taking up an old thread:) >> here's now the main part of my EH rework. >> It modifies the reset callbacks for SCSI EH such that >> each callback (eh_host_reset_handler, eh_bus_reset_handler, >> eh_target_reset_handler, eh_device_reset_handler) only >> references the actual entity it needs to work on >> (ie 'Scsi_Host', (scsi bus), 'scsi_target', 'scsi_device'), >> and the 'struct scsi_cmnd' is dropped from the argument list. >> This simplifies the handler themselves as they don't need to >> exclude some 'magic' command, and we don't need to allocate >> a mock 'struct scsi_cmnd' when issuing a reset via SCSI ioctl. >> >> The entire patchset can be found at: >> >> https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git >> branch eh-rework.v8 > > This doesn't exist (yet?). I also tried to somehow get both part 2 of the > preparations and this series applied on some tree, but failed. > Preparations part 2 seems to be based on some form of Linus' master tree, and > this on Martin's staging tree? > Maybe I'm just unlucky :D > Maybe you are. Pushed now, please try again. Cheers, Hannes
On Tue, Oct 24, 2023 at 07:40:15PM +0200, Hannes Reinecke wrote: > On 10/24/23 19:30, Benjamin Block wrote: > > On Mon, Oct 23, 2023 at 11:28:27AM +0200, Hannes Reinecke wrote: > >> The entire patchset can be found at: > >> > >> https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git > >> branch eh-rework.v8 > > > > This doesn't exist (yet?). I also tried to somehow get both part 2 of the > > preparations and this series applied on some tree, but failed. > > Preparations part 2 seems to be based on some form of Linus' master tree, and > > this on Martin's staging tree? > > Maybe I'm just unlucky :D > > > Maybe you are. > Pushed now, please try again. That was v9, but I guess that works as well, thanks.
On 2023/10/23 17:28, Hannes Reinecke wrote: > Hi all, > > (taking up an old thread:) > here's now the main part of my EH rework. > It modifies the reset callbacks for SCSI EH such that > each callback (eh_host_reset_handler, eh_bus_reset_handler, > eh_target_reset_handler, eh_device_reset_handler) only > references the actual entity it needs to work on > (ie 'Scsi_Host', (scsi bus), 'scsi_target', 'scsi_device'), > and the 'struct scsi_cmnd' is dropped from the argument list. > This simplifies the handler themselves as they don't need to > exclude some 'magic' command, and we don't need to allocate > a mock 'struct scsi_cmnd' when issuing a reset via SCSI ioctl. > > The entire patchset can be found at: > > https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git > branch eh-rework.v8 > > As usual, comments and reviews are welcome. > Hi Hannes, It seems a long time, is this work still going on? > Changes to v6: > - Include reviews from Bart > - Add patch to return -EAGAIN from scsi_ioctl_reset() > > Changes to v5: > - Improve description for patch to modify scsi_eh_bus_device_reset() > - Add patch to modify the iteratrion in scsi_eh_bus_reset() > > Hannes Reinecke (10): > scsi: Use Scsi_Host as argument for eh_host_reset_handler > scsi: Use Scsi_Host and channel number as argument for > eh_bus_reset_handler() > scsi: Use scsi_target as argument for eh_target_reset_handler() > scsi: Use scsi_device as argument to eh_device_reset_handler() > scsi: set host byte after EH completed > scsi_error: iterate over list of failed commands in > scsi_eh_bus_reset() > scsi: Do not allocate scsi command in scsi_ioctl_reset() > scsi_error: iterate over list of failed commands in > scsi_eh_bus_device_reset() > scsi_error: map FAST_IO_FAIL to -EAGAIN in SCSI EH > scsi: remove SUBMITTED_BY_SCSI_RESET_IOCTL >
Hello Hannes, On Mon, Oct 23, 2023 at 11:28:27AM +0200, Hannes Reinecke wrote: > Hi all, > > (taking up an old thread:) > here's now the main part of my EH rework. > It modifies the reset callbacks for SCSI EH such that > each callback (eh_host_reset_handler, eh_bus_reset_handler, > eh_target_reset_handler, eh_device_reset_handler) only > references the actual entity it needs to work on > (ie 'Scsi_Host', (scsi bus), 'scsi_target', 'scsi_device'), > and the 'struct scsi_cmnd' is dropped from the argument list. > This simplifies the handler themselves as they don't need to > exclude some 'magic' command, and we don't need to allocate > a mock 'struct scsi_cmnd' when issuing a reset via SCSI ioctl. > > The entire patchset can be found at: > > https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git > branch eh-rework.v8 > > As usual, comments and reviews are welcome. This seems to be the latest version of your EH rework. Do you have any plans to send a v9? Kind regards, Niklas
On 11/5/24 10:10, Niklas Cassel wrote: > Hello Hannes, > > On Mon, Oct 23, 2023 at 11:28:27AM +0200, Hannes Reinecke wrote: >> Hi all, >> >> (taking up an old thread:) >> here's now the main part of my EH rework. >> It modifies the reset callbacks for SCSI EH such that >> each callback (eh_host_reset_handler, eh_bus_reset_handler, >> eh_target_reset_handler, eh_device_reset_handler) only >> references the actual entity it needs to work on >> (ie 'Scsi_Host', (scsi bus), 'scsi_target', 'scsi_device'), >> and the 'struct scsi_cmnd' is dropped from the argument list. >> This simplifies the handler themselves as they don't need to >> exclude some 'magic' command, and we don't need to allocate >> a mock 'struct scsi_cmnd' when issuing a reset via SCSI ioctl. >> >> The entire patchset can be found at: >> >> https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git >> branch eh-rework.v8 >> >> As usual, comments and reviews are welcome. > > This seems to be the latest version of your EH rework. > > Do you have any plans to send a v9? > Weelll ... I didn't really proceed with that, as that requires for some LLDDs to set a side a command tag for TMF. It was relatively easy pre-multiqueue times (where you could just reduce max_commands by 1), but for blk-mq that now longer works. We need to do some really cumbersome things (just look at fnic ...) and I hoped I could get the 'reserved commands for TMF' patchset in first, so then this one would be easy. Alas, this hasn't happened, and so I didn't continue on that work. But I'll see if I can resurrect it. Cheers, Hannes
Hello Hannes, On Tue, Nov 05, 2024 at 04:22:40PM +0100, Hannes Reinecke wrote: > On 11/5/24 10:10, Niklas Cassel wrote: > > Hello Hannes, > > > > On Mon, Oct 23, 2023 at 11:28:27AM +0200, Hannes Reinecke wrote: > > > Hi all, > > > > > > (taking up an old thread:) > > > here's now the main part of my EH rework. > > > It modifies the reset callbacks for SCSI EH such that > > > each callback (eh_host_reset_handler, eh_bus_reset_handler, > > > eh_target_reset_handler, eh_device_reset_handler) only > > > references the actual entity it needs to work on > > > (ie 'Scsi_Host', (scsi bus), 'scsi_target', 'scsi_device'), > > > and the 'struct scsi_cmnd' is dropped from the argument list. > > > This simplifies the handler themselves as they don't need to > > > exclude some 'magic' command, and we don't need to allocate > > > a mock 'struct scsi_cmnd' when issuing a reset via SCSI ioctl. > > > > > > The entire patchset can be found at: > > > > > > https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git > > > branch eh-rework.v8 > > > > > > As usual, comments and reviews are welcome. > > > > This seems to be the latest version of your EH rework. > > > > Do you have any plans to send a v9? > > > Weelll ... I didn't really proceed with that, as that requires > for some LLDDs to set a side a command tag for TMF. > > It was relatively easy pre-multiqueue times (where you could just > reduce max_commands by 1), but for blk-mq that now longer works. > > We need to do some really cumbersome things (just look at fnic ...) > and I hoped I could get the 'reserved commands for TMF' patchset > in first, so then this one would be easy. I see, I didn't realize that the series had outstanding dependencies. For anyone else looking for the actual series in lore, here there are: EH rework prep patches, part 1: https://lore.kernel.org/linux-scsi/20231002154328.43718-1-hare@suse.de/ - This series has been merged by Martin, and was included in v6.7. EH rework prep patches, part 2: https://lore.kernel.org/linux-scsi/20231023091507.120828-1-hare@suse.de/ - This series has not been merged, and is most likely the 'reserved commands for TMF' series that Hannes is referring to. EH rework, main part (or part 3): https://lore.kernel.org/linux-scsi/20231023092837.33786-1-hare@suse.de/ - Depends on part 2 (which has not been merged yet). > > Alas, this hasn't happened, and so I didn't continue on that work. > But I'll see if I can resurrect it.