[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 15/35] migration: don't rely on any QERR_SOCKET_
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH 15/35] migration: don't rely on any QERR_SOCKET_* |
Date: |
Tue, 14 Aug 2012 13:35:59 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) |
Juan Quintela <address@hidden> writes:
> Markus Armbruster <address@hidden> wrote:
>> Luiz Capitulino <address@hidden> writes:
>>
>>> Use the in_progress argument for QERR_SOCKET_CONNECT_IN_PROGRESS. The
>>> other errors are handled the same by checking if the error is set and
>>> then calling migrate_fd_error() if it's.
>>>
>>> It's also necessary to change inet_connect_opts() not to set
>>> QERR_SOCKET_CONNECT_IN_PROGRESS. This error is only used by
>>> tcp_start_outgoing_migration() and not changing it along with the
>>> usage of in_progress would break migration.
>>>
>>> Furthermore this commit fixes a bug. Today, there's a spurious error
>>> report when migration succeeds:
>>>
>>> (qemu) migrate tcp:0:4444
>>> migrate: Connection can not be completed immediately
>>> (qemu)
>>>
>>> After this commit no spurious error is reported anymore.
>>>
>>> Signed-off-by: Luiz Capitulino <address@hidden>
>>
>> I'd prefer
>>
>> s->fd = inet_connect(host_port, false, &in_progress, errp);
>> if (error_is_set(errp)) {
>> migrate_fd_error(s);
>> return -1;
>> }
>> if (in_progress) {
>> DPRINTF("connect in progress\n");
>> qemu_set_fd_handler2(s->fd, NULL, NULL, tcp_wait_for_connect, s);
>> } else {
>> migrate_fd_connect(s);
>> }
>> return 0;
>>
>> because it separates abnormal and normal code paths more clearly.
>>
>> Matter of taste.
>
>
> The 1st migrate_fd_error() is not needed (it was already wrong).
>
> migrate_fd_* functions are supposed to be called only after
> migrate_fd_connect() has been called.
It's been committed. Could you post a patch for it?
- Re: [Qemu-devel] [PATCH 14/35] net: inet_connect(), inet_connect_opts(): add in_progress argument, (continued)
- [Qemu-devel] [PATCH 32/35] error, qerror: pass desc string to error calls, Luiz Capitulino, 2012/08/07
- [Qemu-devel] [PATCH 26/35] error: add error_get_class(), Luiz Capitulino, 2012/08/07
- [Qemu-devel] [PATCH 22/35] qapi-schema: add ErrorClass enum, Luiz Capitulino, 2012/08/07
- [Qemu-devel] [PATCH 19/35] qapi: qapi-types.h: don't include qapi/qapi-types-core.h, Luiz Capitulino, 2012/08/07
- [Qemu-devel] [PATCH 01/35] monitor: drop unused monitor debug code, Luiz Capitulino, 2012/08/07
- [Qemu-devel] [PATCH 15/35] migration: don't rely on any QERR_SOCKET_*, Luiz Capitulino, 2012/08/07
[Qemu-devel] [PATCH 30/35] qemu-ga: switch to the new error format on the wire, Luiz Capitulino, 2012/08/07
[Qemu-devel] [PATCH 10/35] error: don't delay error message construction, Luiz Capitulino, 2012/08/07
[Qemu-devel] [PATCH 27/35] hmp: hmp_change(): use error_get_class(), Luiz Capitulino, 2012/08/07
[Qemu-devel] [PATCH 08/35] qerror: qerror_format(): return an allocated string, Luiz Capitulino, 2012/08/07