[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 4/9] migration: rename vmstate_save_needed->vmstate_section_ne
From: |
marcandre . lureau |
Subject: |
[PATCH v2 4/9] migration: rename vmstate_save_needed->vmstate_section_needed |
Date: |
Tue, 24 Oct 2023 12:40:38 +0400 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
The function is used on save at this point. The following commits will
use it on load.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
include/migration/vmstate.h | 2 +-
migration/savevm.c | 2 +-
migration/vmstate.c | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h
index 1a31fb7293..1af181877c 100644
--- a/include/migration/vmstate.h
+++ b/include/migration/vmstate.h
@@ -1202,7 +1202,7 @@ int vmstate_save_state_v(QEMUFile *f, const
VMStateDescription *vmsd,
void *opaque, JSONWriter *vmdesc,
int version_id, Error **errp);
-bool vmstate_save_needed(const VMStateDescription *vmsd, void *opaque);
+bool vmstate_section_needed(const VMStateDescription *vmsd, void *opaque);
#define VMSTATE_INSTANCE_ID_ANY -1
diff --git a/migration/savevm.c b/migration/savevm.c
index 8622f229e5..ca5c7cebe0 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -985,7 +985,7 @@ static int vmstate_save(QEMUFile *f, SaveStateEntry *se,
JSONWriter *vmdesc)
if ((!se->ops || !se->ops->save_state) && !se->vmsd) {
return 0;
}
- if (se->vmsd && !vmstate_save_needed(se->vmsd, se->opaque)) {
+ if (se->vmsd && !vmstate_section_needed(se->vmsd, se->opaque)) {
trace_savevm_section_skip(se->idstr, se->section_id);
return 0;
}
diff --git a/migration/vmstate.c b/migration/vmstate.c
index 1cf9e45b85..16e33a5d34 100644
--- a/migration/vmstate.c
+++ b/migration/vmstate.c
@@ -324,7 +324,7 @@ static void vmsd_desc_field_end(const VMStateDescription
*vmsd,
}
-bool vmstate_save_needed(const VMStateDescription *vmsd, void *opaque)
+bool vmstate_section_needed(const VMStateDescription *vmsd, void *opaque)
{
if (vmsd->needed && !vmsd->needed(opaque)) {
/* optional section not needed */
@@ -522,7 +522,7 @@ static int vmstate_subsection_save(QEMUFile *f, const
VMStateDescription *vmsd,
trace_vmstate_subsection_save_top(vmsd->name);
while (sub && *sub) {
- if (vmstate_save_needed(*sub, opaque)) {
+ if (vmstate_section_needed(*sub, opaque)) {
const VMStateDescription *vmsdsub = *sub;
uint8_t len;
--
2.41.0
- [PATCH v2 0/9] RFC: migration: check required entries and sections are loaded, marcandre . lureau, 2023/10/24
- [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 <=
- [PATCH v2 5/9] migration: check required subsections are loaded, once, 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 9/9] docs/migration: reflect the changes about needed subsections, marcandre . lureau, 2023/10/24