[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 1/3] migration: Use savevm_handlers instead o
From: |
Dr. David Alan Gilbert |
Subject: |
Re: [Qemu-devel] [PATCH v2 1/3] migration: Use savevm_handlers instead of loadvm copy |
Date: |
Tue, 30 May 2017 18:30:39 +0100 |
User-agent: |
Mutt/1.8.2 (2017-04-18) |
* Juan Quintela (address@hidden) wrote:
> There is no reason for having the loadvm_handlers at all. There is
> only one use, and we can use the savevm handlers.
>
> We will remove the loadvm handlers on a following patch.
<snip>
> trace_qemu_loadvm_state_section_partend(section_id);
> - QLIST_FOREACH(le, &mis->loadvm_handlers, entry) {
> - if (le->section_id == section_id) {
> + QTAILQ_FOREACH(se, &savevm_state.handlers, entry) {
> + if (se->section_id == section_id) {
Isn't this the problem? What guarantees that the se->section_id
is the same as the source's section_id - I don't think anything.
It's just dynamically allocated in register_savevm_live so the
initialisation order on source/dest could be different and you'd
get different ID. You can't update se->section_id
unless you guaranteed to updated all of them.
Dave
> break;
> }
> }
> - if (le == NULL) {
> + if (se == NULL) {
> error_report("Unknown savevm section %d", section_id);
> return -EINVAL;
> }
>
> - ret = vmstate_load(f, le->se, le->version_id);
> + ret = vmstate_load(f, se, se->load_version_id);
> if (ret < 0) {
> error_report("error while loading state section id %d(%s)",
> - section_id, le->se->idstr);
> + section_id, se->idstr);
> return ret;
> }
> - if (!check_section_footer(f, le)) {
> + if (!check_section_footer(f, se)) {
> return -EINVAL;
> }
>
> --
> 2.9.4
>
--
Dr. David Alan Gilbert / address@hidden / Manchester, UK