Re: [PATCH] scsi: scsi_error: the Error Handler base on SCSI Device

From: Bart Van Assche
Date: Tue Nov 25 2025 - 11:36:50 EST



On 11/25/25 5:48 AM, JiangJianJun wrote:
When a SCSI device fails, SCSI locks the host and enters an error handler,
which causes all I/O operations on the host to be locked. This performance
impact is even more pronounced when a large number of devices are connected
to the same host. So I believe it's necessary to downgrade the large lock.

This commit binds an Error Handler to the device, so that when a device
failure occurs, only the current device is locked. If the device fails to
recover, the default Error Handler will still be activated.

The current behavior should be retained as the default and the new
behavior should only be enabled if a SCSI LLD requests the new behavior
because many SCSI LLD .eh_host_reset_handler implementations are based
on the assumption that no I/O is in progress if they are called.

Bart.