From: Juan Quintela <quintela@redhat.com>
To: Jan Kiszka <jan.kiszka@web.de>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] Re: vmstate: Useless post_save?
Date: Sun, 09 May 2010 09:50:32 +0200 [thread overview]
Message-ID: <m3k4rdecon.fsf@trasno.mitica> (raw)
In-Reply-To: <4BE4968B.6050805@web.de> (Jan Kiszka's message of "Sat, 08 May 2010 00:39:07 +0200")
Jan Kiszka <jan.kiszka@web.de> wrote:
> Hi all,
>
> I wondered why we have the post_save callback in vmstate. Conceptually,
> it made no sense to me. So I grep'ed for its users - and found exactly
> one: tmp105. As suspected, only "strange" code was found:
>
> static void tmp105_post_save(void *opaque)
> {
> TMP105State *s = opaque;
> s->faults = tmp105_faultq[(s->config >> 3) & 3]; /* F */
> }
>
> First, s->config cannot be changed by saving the state. And, second,
> s->faults is only written by this driver, never read.
>
> Anyone any concerns dropping 'faults' from tmp105 and then dropping the
> post_save handler from vmstate?
About 'faults' dropping, I have to opinion at all. It is done this way
because old code did it this way.
About post_save() it should be there only to "undo" things done in
"pre_save" to be able to continue in the source after a failed
migration.
As you have found, not much users around. If you remove tmp105 user, I
vote to remove it. We can "revert" the removal if need appears again.
Later, Juan.
next prev parent reply other threads:[~2010-05-09 7:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-07 22:39 [Qemu-devel] vmstate: Useless post_save? Jan Kiszka
2010-05-09 7:50 ` Juan Quintela [this message]
2010-05-11 2:39 ` [Qemu-devel] " andrzej zaborowski
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=m3k4rdecon.fsf@trasno.mitica \
--to=quintela@redhat.com \
--cc=jan.kiszka@web.de \
--cc=qemu-devel@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.