From: Peter Xu <peterx@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Cc: Fabiano Rosas <farosas@suse.de>,
Pierrick Bouvier <pierrick.bouvier@linaro.org>,
Nicholas Piggin <npiggin@gmail.com>,
Harsh Prateek Bora <harshpb@linux.ibm.com>,
Peter Maydell <peter.maydell@linaro.org>,
"open list:All patches CC here" <qemu-devel@nongnu.org>,
"open list:sPAPR (pseries)" <qemu-ppc@nongnu.org>,
"open list:ARM TCG CPUs" <qemu-arm@nongnu.org>
Subject: Re: [PATCH v2 03/16] migration: make .post_save() a void function
Date: Tue, 3 Mar 2026 10:05:52 -0500 [thread overview]
Message-ID: <aab40Ou7EjkdYYv3@x1.local> (raw)
In-Reply-To: <5be3da95-a636-4b50-8d68-17f363fc005b@yandex-team.ru>
On Sat, Feb 28, 2026 at 02:56:30AM +0300, Vladimir Sementsov-Ogievskiy wrote:
> On 28.02.26 01:41, Fabiano Rosas wrote:
> > > diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h
> > > index 3695afd483..15578b3e28 100644
> > > --- a/include/migration/vmstate.h
> > > +++ b/include/migration/vmstate.h
> > > @@ -223,7 +223,15 @@ struct VMStateDescription {
> > > bool (*post_load_errp)(void *opaque, int version_id, Error **errp);
> > > int (*pre_save)(void *opaque);
> > > bool (*pre_save_errp)(void *opaque, Error **errp);
> > > - int (*post_save)(void *opaque);
> > > +
> > > + /*
> > > + * post_save() rarely used to free some temporary resources.
> > > + * It's is called if .pre_save[_errp]() call was successful
> > > + * (or .pre_save[_errp] handler absent), regardless success
> > > + * or failure during fields and subsections save. If
> > > + * .pre_save[_errp]() fails, .post_save() is not called.
> > > + */
> > I would not mention usage directly and maybe also simplify the language
> > a bit. If there's doubt on the exact flow, people can read the code:
> >
> > /*
> > * Unless .pre_save() fails, post_save() is called after saving
> > * fields and subsections. It should not fail because at this point
> > * the state has potentially already been transferred.
> > */
>
>
> Agree, sounds good.
With the update, feel free to take:
Reviewed-by: Peter Xu <peterx@redhat.com>
--
Peter Xu
prev parent reply other threads:[~2026-03-03 15:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260220210214.800050-1-vsementsov@yandex-team.ru>
2026-02-20 21:02 ` [PATCH v2 03/16] migration: make .post_save() a void function Vladimir Sementsov-Ogievskiy
2026-02-27 22:41 ` Fabiano Rosas
2026-02-27 23:56 ` Vladimir Sementsov-Ogievskiy
2026-03-03 15:05 ` Peter Xu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aab40Ou7EjkdYYv3@x1.local \
--to=peterx@redhat.com \
--cc=farosas@suse.de \
--cc=harshpb@linux.ibm.com \
--cc=npiggin@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=pierrick.bouvier@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=vsementsov@yandex-team.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox