From: Juan Quintela <quintela@redhat.com>
To: Peter Xu <peterx@redhat.com>
Cc: qemu-devel@nongnu.org, Markus Armbruster <armbru@redhat.com>,
Laurent Vivier <lvivier@redhat.com>,
"Dr . David Alan Gilbert" <dgilbert@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 2/6] migration: move global_state.optional out
Date: Thu, 08 Jun 2017 13:12:29 +0200 [thread overview]
Message-ID: <87efuubun6.fsf@secure.mitica> (raw)
In-Reply-To: <20170608104127.GE3628@pxdev.xzpeter.org> (Peter Xu's message of "Thu, 8 Jun 2017 18:41:27 +0800")
Peter Xu <peterx@redhat.com> wrote:
> On Wed, Jun 07, 2017 at 07:42:57PM +0200, Juan Quintela wrote:
>> > +/* This is only used if MigrationState.store_global_state is set. */
>> > static GlobalState global_state;
>> >
>> > int global_state_store(void)
>> > @@ -179,7 +179,7 @@ static RunState global_state_get_runstate(void)
>> >
>> > void global_state_set_optional(void)
>> > {
>> > - global_state.optional = true;
>> > + migrate_get_current()->store_global_state = false;
>>
>> Part of the advantage (for me) of using qapi was not to have to export
>> a function to set this. I.e. isn't a way to call
>>
>> qemu_opt_get_bool(migration_opts, "store_global_state", true)
>>
>> qapi_<magic>_set_bool(migration_opts, "store_global_state",false);
>> ?
>
> I didn't catch the comment here... Do you mean e.g.
> qemu_opt_set_bool()? Here can we use it in some way?
>
> (I thought we were using the "-global migration.store_global_state"
> parameter, then it'll setup MigrationState.store_global_state, isn't
> that the trick?)
Yeap. Althought for me would be the same if that is stored anywhare
else. I don't really care where it is stored.
>>
>> So, I don't have to eport global_state_set_optional()?
>>
>
> As mentioned in latter patch, xen_init() still uses it, so looks like
> we still need it?
Yeap. I *thought* that there was a way to test/set thing
programatically also so I didn't have to create/export that functions.
My ideal world would be that there were something like that
qemu_opt_get_bool(migration_opts, "store_global_state", true);
so I only have to export migration_opts (or whatever), and just set/read
values from places like xen_init. Im my ideal world, if I have to
create a new "property", I don't want to have to export a function to
set/read it. For instance, the case of xen_init(). We haven't been
able to remove global_state_set_optional() because they don't know about
properties.
I still love the patches are they are. Boing able to set things from
the command line makes things so much better/easier O:-)
> I can squash this patch with the next if you like it.
That is up to you.
Thanks, Juan.
next prev parent reply other threads:[~2017-06-08 11:12 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-06 10:30 [Qemu-devel] [PATCH 0/6] migration: objectify MigrationState Peter Xu
2017-06-06 10:30 ` [Qemu-devel] [PATCH 1/6] migration: let MigrationState be a qdev Peter Xu
2017-06-07 16:52 ` Juan Quintela
2017-06-06 10:30 ` [Qemu-devel] [PATCH 2/6] migration: move global_state.optional out Peter Xu
2017-06-07 17:42 ` Juan Quintela
2017-06-08 10:41 ` Peter Xu
2017-06-08 11:12 ` Juan Quintela [this message]
2017-06-08 12:44 ` Peter Xu
2017-06-08 13:24 ` Juan Quintela
2017-06-06 10:30 ` [Qemu-devel] [PATCH 3/6] migration: use compat bit for global_state Peter Xu
2017-06-07 17:44 ` Juan Quintela
2017-06-06 10:30 ` [Qemu-devel] [PATCH 4/6] migration: move only_migratable to MigrationState Peter Xu
2017-06-06 10:30 ` [Qemu-devel] [PATCH 5/6] migration: move skip_configuration out Peter Xu
2017-06-07 17:48 ` Juan Quintela
2017-06-06 10:30 ` [Qemu-devel] [PATCH 6/6] migration: move skip_section_footers Peter Xu
2017-06-07 17:52 ` Juan Quintela
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=87efuubun6.fsf@secure.mitica \
--to=quintela@redhat.com \
--cc=armbru@redhat.com \
--cc=dgilbert@redhat.com \
--cc=lvivier@redhat.com \
--cc=peterx@redhat.com \
--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.