Re: [PATCH v3 1/2] Ensure that the SCSI error handler gets woken up

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In case (a) scsi_eh_inc_host_failed() will wake up the error handler. And in
case (b) scsi_dec_host_busy() will wake up the error handler. So it's not
clear to me why you think that there is a scenario in which the EH won't be
woken up?

So in case (b), in my understanding, scsi_dec_host_busy can skip wakeups
as it does not see host_failed change yet.

That's not correct. If scsi_dec_host_busy() obtains the SCSI host lock before
scsi_eh_inc_host_failed() obtains it then the latter function will trigger a
SCSI EH wakeup.

You are right! Thanks a lot for pointing that out! Now when I understand it, your patch looks good for me:

Reviewed-by: Pavel Tikhomirov <ptikhomirov@xxxxxxxxxxxxx>

By the way, I very much like your idea of using rcu for these case.

Thanks, Pavel.


Bart.




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]