Re: [Qemu-devel] [Qemu-block] [PATCH] file-posix: unlock qemu_global_mutex before pread when attach disk

2019-06-11 Thread Kevin Wolf
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:

Re: [Qemu-devel] [Qemu-block] [PATCH] file-posix: unlock qemu_global_mutex before pread when attach disk

2019-06-10 Thread l00284672
-- 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? On 2019/6/11 0:03, Paolo Bonzini wrote: On 10/06/19 16:51, l00284672 wrote: The pread will hang in attaching disk just when backend

Re: [Qemu-devel] [Qemu-block] [PATCH] file-posix: unlock qemu_global_mutex before pread when attach disk

2019-06-10 Thread Paolo Bonzini
On 10/06/19 16:51, l00284672 wrote: > The pread will hang in attaching disk just when backend storage network > disconnection . Would the "open" hang as well in that case? > I think the locking range of qemu_global_mutex is too large when do qmp > operation. what > does the qemu_global_mutex 

Re: [Qemu-devel] [Qemu-block] [PATCH] file-posix: unlock qemu_global_mutex before pread when attach disk

2019-06-10 Thread l00284672
The pread will hang in attaching disk just when backend storage network disconnection . I think the locking range of qemu_global_mutex is too large when do qmp operation. what does the qemu_global_mutex  really protect?  what is the risk of unlocking qemu_global_mutex in qmp? On

Re: [Qemu-devel] [Qemu-block] [PATCH] file-posix: unlock qemu_global_mutex before pread when attach disk

2019-06-10 Thread Paolo Bonzini
On 10/06/19 15:34, Zhengui li wrote: > > when do qmp sush as drive_add, qemu main thread locks the > qemu_global_mutex and do pread in raw_probe_alignmen. Pread is a > synchronous operation. If backend storage network has a large delay > or IO pressure is too large, the pread operation will