Am 11.06.2019 um 04:53 hat l00284672 geschrieben: > -- Would the "open" hang as well in that case? > The "open" doesn't hang in that case. > > Do you have any better solutions to solve this problem in the case?
Yes, but unfortunately it's a lot harder. This is roughly what you'd have to do: 1. Make QMP command handlers async (patches from Marc-André are on the list) 2. Stop using HMP drive_add and instead switch to QMP blockdev-add 3. Move the blockdev-add code into a coroutine 4. Make .bdrv_open a coroutine_fn 5. Move the pread() in file-posix to the thread pool and let the coroutine yield while the request is running Only with all of these pieces in place we'll be able to release the global mutex while we're waiting for the pread() to complete. Kevin