[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v6 01/19] migration: Create migration_ioc_proces
From: |
Peter Xu |
Subject: |
Re: [Qemu-devel] [PATCH v6 01/19] migration: Create migration_ioc_process_incoming() |
Date: |
Fri, 11 Aug 2017 11:47:25 +0800 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
On Tue, Aug 08, 2017 at 06:26:11PM +0200, Juan Quintela wrote:
[...]
> void migration_fd_process_incoming(QEMUFile *f)
> {
> - Coroutine *co = qemu_coroutine_create(process_incoming_migration_co, f);
> -
> + Coroutine *co = qemu_coroutine_create(process_incoming_migration_co,
> NULL);
> + MigrationIncomingState *mis = migration_incoming_get_current();
> +
> + if (!mis->from_src_file) {
> + mis->from_src_file = f;
[1]
> + }
> qemu_file_set_blocking(f, false);
> qemu_coroutine_enter(co);
> }
>
> +void migration_ioc_process_incoming(QIOChannel *ioc)
> +{
> + MigrationIncomingState *mis = migration_incoming_get_current();
> +
> + if (!mis->from_src_file) {
> + QEMUFile *f = qemu_fopen_channel_input(ioc);
> + mis->from_src_file = f;
Remove this line? Since migration_fd_process_incoming() will set it up
as well below at [1].
Then we can make sure there will be only one place to setup
from_src_file.
> + migration_fd_process_incoming(f);
> + }
> + /* We still only have a single channel. Nothing to do here yet */
> +}
Thanks,
--
Peter Xu
- [Qemu-devel] [PATCH v6 13/19] migration: Really use multiple pages at a time, (continued)
- [Qemu-devel] [PATCH v6 13/19] migration: Really use multiple pages at a time, Juan Quintela, 2017/08/08
- [Qemu-devel] [PATCH v6 14/19] migration: Send the fd number which we are going to use for this page, Juan Quintela, 2017/08/08
- [Qemu-devel] [PATCH v6 15/19] migration: Create thread infrastructure for multifd recv side, Juan Quintela, 2017/08/08
- [Qemu-devel] [PATCH v6 17/19] migration: Rename initial_bytes, Juan Quintela, 2017/08/08
- [Qemu-devel] [PATCH v6 16/19] migration: Test new fd infrastructure, Juan Quintela, 2017/08/08
- [Qemu-devel] [PATCH v6 18/19] migration: Transfer pages over new channels, Juan Quintela, 2017/08/08
- [Qemu-devel] [PATCH v6 19/19] migration: Flush receive queue, Juan Quintela, 2017/08/08
- Re: [Qemu-devel] [PATCH v6 00/19] Multifd, no-reply, 2017/08/08
- [Qemu-devel] [PATCH v6 00/19] Multifd, Juan Quintela, 2017/08/08
- [Qemu-devel] [PATCH v6 01/19] migration: Create migration_ioc_process_incoming(), Juan Quintela, 2017/08/08
- [Qemu-devel] [PATCH v6 03/19] migration: Add comments to channel functions, Juan Quintela, 2017/08/08
- [Qemu-devel] [PATCH v6 02/19] migration: Teach it about G_SOURCE_REMOVE, Juan Quintela, 2017/08/08
- [Qemu-devel] [PATCH v6 04/19] migration: Create migration_has_all_channels, Juan Quintela, 2017/08/08
- [Qemu-devel] [PATCH v6 05/19] qio: Create new qio_channel_{readv, writev}_all, Juan Quintela, 2017/08/08