Re: [Qemu-devel] [PATCH 4/4] qemu-nbd: do not start the block layer in the parent

2011-11-04 Thread Paolo Bonzini
On 11/04/2011 12:22 PM, Kevin Wolf wrote: > > That's exactly what this series did. However, daemonization has also to > be done before opening the image file. So the series has to support > reporting errors to syslog, and also qemu-nbd will not give a nonzero > exit status when errors occur

Re: [Qemu-devel] [PATCH 4/4] qemu-nbd: do not start the block layer in the parent

2011-11-04 Thread Kevin Wolf
Am 04.11.2011 12:10, schrieb Paolo Bonzini: > On 11/04/2011 11:31 AM, Kevin Wolf wrote: >>> I tried implementing this, but in general daemonization (which forks and >>> leave only the children) breaks the threading. >>> >>> So we could either keep this series (which moves all errors to syslog, >

Re: [Qemu-devel] [PATCH 4/4] qemu-nbd: do not start the block layer in the parent

2011-11-04 Thread Paolo Bonzini
On 11/04/2011 11:31 AM, Kevin Wolf wrote: > I tried implementing this, but in general daemonization (which forks and > leave only the children) breaks the threading. > > So we could either keep this series (which moves all errors to syslog, > but doesn't otherwise change behavior), or I can f

Re: [Qemu-devel] [PATCH 4/4] qemu-nbd: do not start the block layer in the parent

2011-11-04 Thread Kevin Wolf
Am 04.11.2011 10:46, schrieb Paolo Bonzini: > On 10/28/2011 02:17 PM, Paolo Bonzini wrote: >>> Yes, it would be better if we could have error output on stderr. Now, >>> "simple" errors such as a missing image file (or wrong path to the >>> image) are reported to syslog instead. It could be the sour

Re: [Qemu-devel] [PATCH 4/4] qemu-nbd: do not start the block layer in the parent

2011-11-04 Thread Paolo Bonzini
On 10/28/2011 02:17 PM, Paolo Bonzini wrote: Yes, it would be better if we could have error output on stderr. Now, "simple" errors such as a missing image file (or wrong path to the image) are reported to syslog instead. It could be the source of some headaches... Is there a way we could have th

Re: [Qemu-devel] [PATCH 4/4] qemu-nbd: do not start the block layer in the parent

2011-10-28 Thread Paolo Bonzini
On 10/28/2011 02:16 PM, Pierre Riteau wrote: Yes, it would be better if we could have error output on stderr. Now, "simple" errors such as a missing image file (or wrong path to the image) are reported to syslog instead. It could be the source of some headaches... Is there a way we could have th

Re: [Qemu-devel] [PATCH 4/4] qemu-nbd: do not start the block layer in the parent

2011-10-28 Thread Pierre Riteau
On 28 oct. 2011, at 13:57, Paolo Bonzini wrote: > On 10/28/2011 01:56 PM, Pierre Riteau wrote: >> Thanks a lot Paolo, I confirm this patchset fixes the bug! > > Do you believe the limitation on error reporting to be too strong? > > Paolo Yes, it would be better if we could have error output on

Re: [Qemu-devel] [PATCH 4/4] qemu-nbd: do not start the block layer in the parent

2011-10-28 Thread Paolo Bonzini
On 10/28/2011 01:56 PM, Pierre Riteau wrote: Thanks a lot Paolo, I confirm this patchset fixes the bug! Do you believe the limitation on error reporting to be too strong? Paolo

Re: [Qemu-devel] [PATCH 4/4] qemu-nbd: do not start the block layer in the parent

2011-10-28 Thread Pierre Riteau
Thanks a lot Paolo, I confirm this patchset fixes the bug! -- Pierre Riteau -- PhD student, Myriads team, IRISA, Rennes, France http://perso.univ-rennes1.fr/pierre.riteau/ On 28 oct. 2011, at 12:17, Paolo Bonzini wrote: > Forking and threading do not behave very well together. With qemu-nbd in

[Qemu-devel] [PATCH 4/4] qemu-nbd: do not start the block layer in the parent

2011-10-28 Thread Paolo Bonzini
Forking and threading do not behave very well together. With qemu-nbd in -c mode it could happen that the thread pool is started in the parent, and the children (the one actually doing the I/O) is left without working I/O. Fix this by only running bdrv_init in the child process. Reported-by: Pier