On 03/09/20 17:42, Vladimir Sementsov-Ogievskiy wrote: > > > so no timer exists now: reconnect code goes to yield during drain, to > continue after drain-end.. Haha, that's obviously bad design, as nobody > will wake up the waiting requests, and drain will hang forever. OK > thanks, you helped me, I see now that nbd code is wrong.. > > But still, is it OK to do blk_drain holding the global mutex? Drain may > take a relatively long time, and vm is not responding due to global > mutex locked in cpu thread..
It has been like that forever, and it's a major reason to use iothreads even if you don't care about performance. Paolo