Markus Armbruster <arm...@redhat.com> wrote:
> Juan Quintela <quint...@redhat.com> writes:
>>>>>
>>>>> Doesn't this break inet_nonblocking_connect() and
>>>>> unix_nonblocking_connect()?
>>>>>
>>>>> In your cover letter, you wrote:
>>>>>
>>>>>     Note: Writes has become blocking, and I have to change the "remove"
>>>>>     the feature now in qemu-sockets.c.  Checked that migration was the
>>>>>     only user of that feature.  If new users appear, they just need to add
>>>>>     the socket_set_nonblock() by hand.
>>>>>
>>>>> Yes, migration-{tcp,unix} are their only users, but if they want a
>>>>> blocking socket now, why not use inet_connect() and unix_connect()?
>>>>>
>>>>> New users can't "just add socket_set_nonblock()".  They'd have to add it
>>>>> right where you deleted it: between qemu_socket() and connect().  Else
>>>>> the connect() is blocking.
>>>>
>>>> Grrr.
>>>>
>>>> So, is there any way to make a connection that is non-blocking, but then
>>>> writes are blocking?
>>>
>>> Which operations on the migration socket do you need to block, and which
>>> ones do you need not to block?
>>
>> connect: not blocking (done on the iothread)
>> writes: blocking, done in the migration thread.
>>
>> I think thet socket_set_block() that paolo says is the right solution.
>
> Sounds good.
>
> By the way, I probably would've missed this had you not pointed to it in
> the cover letter.  Smart move on your part.

I knew somebody would have noticed, so it was supposed to be a "priori"
apologize ....

thanks, Juan.

Reply via email to