On Mon, Oct 23, 2023 at 11:28:36AM +0200, Hannes Reinecke wrote: > Returning FAST_IO_FAIL from any of the SCSI EH functions is perfectly > valid, and indicates that the request could not be executed due to > the transport being busy. > But that is not an I/O error, and we should return -EAGAIN from > scsi_ioctl_reset() to correctly inform userspace. I've had a short look at at least one user of this interface `sg_reset`, and that seems to handle this already: https://github.com/doug-gilbert/sg3_utils/blob/0e955c48621f7dc512e34554a060fe9f5cbc8d67/src/sg_reset.c#L251-L267 So this looks good to me. > > Suggested-by: Benjamin Block <bblock@xxxxxxxxxxxxx> > Signed-off-by: Hannes Reinecke <hare@xxxxxxx> > --- > drivers/scsi/scsi_error.c | 23 ++++++++++++++++++----- > 1 file changed, 18 insertions(+), 5 deletions(-) > Reviewed-by: Benjamin Block <bblock@xxxxxxxxxxxxx> -- Best Regards, Benjamin Block / Linux on IBM Z Kernel Development IBM Deutschland Research & Development GmbH / https://www.ibm.com/privacy Vors. Aufs.-R.: Gregor Pillen / Geschäftsführung: David Faller Sitz der Ges.: Böblingen / Registergericht: AmtsG Stuttgart, HRB 243294