On 01/31/2018 08:50 PM, Bart Van Assche wrote:
I think it would be useful to have some variant of the above code in the kernel tree. Are you familiar with the fault injection framework (see also <linux/fault-inject.h> and Documentation/fault-injection/fault-injection.txt)?
No, not yet. That's very interesting.
Do you think that framework would be appropriate for controlling whether or not the above code gets executed?
Yes, apparently it might be done w/ fail attributes to control the wait-loop in the shutdown/unload hook, whether to call scsi_done(), and whether to fail an error handler so it escalates to the next. I'd be happy to take a look at it, if you/others are interested. (just to make sure it does not end up rejected later because of others' opinion. :-) cheers, Mauricio