[Qemu-devel] [PATCH 2/3] qmp: dump-guest-memory: don't spin if non-blocking fd would block

2012-09-26 Thread Luiz Capitulino
fd_write_vmcore() will indefinitely spin for a non-blocking file-descriptor that would block. However, if the fd is non-blocking, how does it make sense to spin? Change this behavior to return an error instead. Note that this can only happen with an fd provided by a management application. The fd

Re: [Qemu-devel] [PATCH 2/3] qmp: dump-guest-memory: don't spin if non-blocking fd would block

2012-09-25 Thread Wen Congyang
At 09/24/2012 09:34 PM, Luiz Capitulino Wrote: > On Mon, 24 Sep 2012 14:27:17 +0800 > Wen Congyang wrote: > >> At 09/22/2012 01:07 AM, Luiz Capitulino Wrote: >>> fd_write_vmcore() will indefinitely spin for a non-blocking >>> file-descriptor that would block. However, if the fd is non-blocking, >

Re: [Qemu-devel] [PATCH 2/3] qmp: dump-guest-memory: don't spin if non-blocking fd would block

2012-09-25 Thread Wen Congyang
At 09/25/2012 05:01 PM, Markus Armbruster Wrote: > Wen Congyang writes: > >> At 09/24/2012 09:34 PM, Luiz Capitulino Wrote: >>> On Mon, 24 Sep 2012 14:27:17 +0800 >>> Wen Congyang wrote: >>> At 09/22/2012 01:07 AM, Luiz Capitulino Wrote: > fd_write_vmcore() will indefinitely spin for a

Re: [Qemu-devel] [PATCH 2/3] qmp: dump-guest-memory: don't spin if non-blocking fd would block

2012-09-25 Thread Markus Armbruster
Wen Congyang writes: > At 09/24/2012 09:34 PM, Luiz Capitulino Wrote: >> On Mon, 24 Sep 2012 14:27:17 +0800 >> Wen Congyang wrote: >> >>> At 09/22/2012 01:07 AM, Luiz Capitulino Wrote: fd_write_vmcore() will indefinitely spin for a non-blocking file-descriptor that would block. Howeve

Re: [Qemu-devel] [PATCH 2/3] qmp: dump-guest-memory: don't spin if non-blocking fd would block

2012-09-25 Thread Wen Congyang
At 09/24/2012 09:34 PM, Luiz Capitulino Wrote: > On Mon, 24 Sep 2012 14:27:17 +0800 > Wen Congyang wrote: > >> At 09/22/2012 01:07 AM, Luiz Capitulino Wrote: >>> fd_write_vmcore() will indefinitely spin for a non-blocking >>> file-descriptor that would block. However, if the fd is non-blocking, >

Re: [Qemu-devel] [PATCH 2/3] qmp: dump-guest-memory: don't spin if non-blocking fd would block

2012-09-24 Thread Luiz Capitulino
On Mon, 24 Sep 2012 14:27:17 +0800 Wen Congyang wrote: > At 09/22/2012 01:07 AM, Luiz Capitulino Wrote: > > fd_write_vmcore() will indefinitely spin for a non-blocking > > file-descriptor that would block. However, if the fd is non-blocking, > > how does it make sense to spin? > > > > Change thi

Re: [Qemu-devel] [PATCH 2/3] qmp: dump-guest-memory: don't spin if non-blocking fd would block

2012-09-23 Thread Wen Congyang
At 09/22/2012 01:07 AM, Luiz Capitulino Wrote: > fd_write_vmcore() will indefinitely spin for a non-blocking > file-descriptor that would block. However, if the fd is non-blocking, > how does it make sense to spin? > > Change this behavior to return an error instead. > > Note that this can only h

Re: [Qemu-devel] [PATCH 2/3] qmp: dump-guest-memory: don't spin if non-blocking fd would block

2012-09-21 Thread Eric Blake
On 09/21/2012 11:07 AM, Luiz Capitulino wrote: > fd_write_vmcore() will indefinitely spin for a non-blocking > file-descriptor that would block. However, if the fd is non-blocking, > how does it make sense to spin? > > Change this behavior to return an error instead. > > Note that this can only h

[Qemu-devel] [PATCH 2/3] qmp: dump-guest-memory: don't spin if non-blocking fd would block

2012-09-21 Thread Luiz Capitulino
fd_write_vmcore() will indefinitely spin for a non-blocking file-descriptor that would block. However, if the fd is non-blocking, how does it make sense to spin? Change this behavior to return an error instead. Note that this can only happen with an fd provided by a management application. The fd