[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 5/9] migration: check required subsections are loaded, on
From: |
Peter Xu |
Subject: |
Re: [PATCH v2 5/9] migration: check required subsections are loaded, once |
Date: |
Tue, 24 Oct 2023 16:10:46 -0400 |
On Tue, Oct 24, 2023 at 12:41:56PM +0200, Juan Quintela wrote:
> > @@ -509,6 +538,13 @@ static int vmstate_subsection_load(QEMUFile *f, const
> > VMStateDescription *vmsd,
> > }
> > }
> >
> > + for (i = 0; i < n; i++) {
> > + if (!visited[i] && vmstate_section_needed(vmsd->subsections[i],
> > opaque)) {
> > + trace_vmstate_subsection_load_bad(vmsd->name,
> > vmsd->subsections[i]->name, "(not visited)");
> > + return -ENOENT;
> > + }
> > + }
> > +
> > trace_vmstate_subsection_load_good(vmsd->name);
> > return 0;
> > }
>
> This part is the only one where I can see there could be some
> discussion. So I wil wait to see what other people think.
Previous email:
https://lore.kernel.org/qemu-devel/ZR2P1RbxCfBdYBaQ@x1n/
I still think it is safer to not fail unless justified that we won't hit
surprises in the ->needed(). There are a lot so I assume it's non-trivial
to justify.
We can switch the tracepoint into error_report() in that case, though, as
long as it won't fail the migration.
Thanks,
--
Peter Xu
- [PATCH v2 1/9] block/fdc: 'phase' is not needed on load, (continued)
- [PATCH v2 1/9] block/fdc: 'phase' is not needed on load, marcandre . lureau, 2023/10/24
- [PATCH v2 2/9] virtio: make endian_needed() work during loading, marcandre . lureau, 2023/10/24
- [PATCH v2 4/9] migration: rename vmstate_save_needed->vmstate_section_needed, marcandre . lureau, 2023/10/24
- [PATCH v2 3/9] net/slirp: use different IDs for each instance, marcandre . lureau, 2023/10/24
- [PATCH v2 6/9] migration: check required entries are loaded, once, marcandre . lureau, 2023/10/24
- [PATCH v2 5/9] migration: check required subsections are loaded, once, marcandre . lureau, 2023/10/24
- [PATCH v2 8/9] test-vmstate: add some subsection tests, marcandre . lureau, 2023/10/24
- [PATCH v2 7/9] migration: set file error on subsection loading, marcandre . lureau, 2023/10/24
- [PATCH v2 9/9] docs/migration: reflect the changes about needed subsections, marcandre . lureau, 2023/10/24