[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH 2/5] migration: moving migration start code
From: |
Gerd Hoffmann |
Subject: |
Re: [Qemu-devel] [RFC PATCH 2/5] migration: moving migration start code to a separated routine |
Date: |
Tue, 05 Jun 2012 10:44:35 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:10.0.4) Gecko/20120422 Thunderbird/10.0.4 |
Hi,
> -static MigrationState *migrate_init(int blk, int inc)
> +static MigrationState *migrate_init(int protocol, const char *protocol_param,
> + int blk, int inc)
> + s->protocol = protocol;
> + s->protocol_param = g_strdup(protocol_param);
Hmm, I think I would store the complete uri here ...
> if (strstart(uri, "tcp:", &p)) {
> - ret = tcp_start_outgoing_migration(s, p, errp);
> + migrate_protocol = MIGRATION_PROTOCOL_TCP;
> #if !defined(WIN32)
> } else if (strstart(uri, "exec:", &p)) {
> - ret = exec_start_outgoing_migration(s, p);
> + migrate_protocol = MIGRATION_PROTOCOL_EXEC;
> } else if (strstart(uri, "unix:", &p)) {
> - ret = unix_start_outgoing_migration(s, p);
> + migrate_protocol = MIGRATION_PROTOCOL_UNIX;
> } else if (strstart(uri, "fd:", &p)) {
> - ret = fd_start_outgoing_migration(s, p);
> + migrate_protocol = MIGRATION_PROTOCOL_FD;
> #endif
... then just move that uri parsing code block to migrate_start().
cheers,
Gerd
- [Qemu-devel] [RFC PATCH 0/5] asynchronous migration state change handlers, Yonit Halperin, 2012/06/05
- [Qemu-devel] [RFC PATCH 1/5] notifiers: add support for async notifiers handlers, Yonit Halperin, 2012/06/05
- [Qemu-devel] [RFC PATCH 2/5] migration: moving migration start code to a separated routine, Yonit Halperin, 2012/06/05
- Re: [Qemu-devel] [RFC PATCH 2/5] migration: moving migration start code to a separated routine,
Gerd Hoffmann <=
- [Qemu-devel] [RFC PATCH 3/5] migration: moving migration completion code to a separated routine, Yonit Halperin, 2012/06/05
- [Qemu-devel] [RFC PATCH 5/5] spice: turn spice "migration end" handler to be async, Yonit Halperin, 2012/06/05
- [Qemu-devel] [RFC PATCH 4/5] migration: replace migration state change notifier with async notifiers, Yonit Halperin, 2012/06/05
- Re: [Qemu-devel] [RFC PATCH 0/5] asynchronous migration state change handlers, Anthony Liguori, 2012/06/05