From: Fabiano Rosas <farosas@suse.de>
To: Peter Xu <peterx@redhat.com>
Cc: qemu-devel@nongnu.org, armbru@redhat.com, ppandit@redhat.com
Subject: Re: [PATCH v2 7/9] migration/options: Open code migrate_params_apply
Date: Fri, 06 Feb 2026 09:25:41 -0300 [thread overview]
Message-ID: <87cy2iqcsa.fsf@suse.de> (raw)
In-Reply-To: <aYUWOl9_w_m-TIqL@x1.local>
Peter Xu <peterx@redhat.com> writes:
> On Mon, Feb 02, 2026 at 07:40:59PM -0300, Fabiano Rosas wrote:
>> Remove migrate_params_apply so the logic of setting migration
>> parameters is all in one spot.
>>
>> Suggested-by: Prasad Pandit <ppandit@redhat.com>
>> Signed-off-by: Fabiano Rosas <farosas@suse.de>
>> ---
>> migration/options.c | 33 ++++++++++++++-------------------
>> 1 file changed, 14 insertions(+), 19 deletions(-)
>>
>> diff --git a/migration/options.c b/migration/options.c
>> index 180ebed51c..733aae51a8 100644
>> --- a/migration/options.c
>> +++ b/migration/options.c
>> @@ -1266,25 +1266,11 @@ bool migrate_params_check(MigrationParameters *params, Error **errp)
>> return true;
>> }
>>
>> -static void migrate_params_apply(MigrationParameters *params)
>> -{
>> - MigrationState *s = migrate_get_current();
>> - MigrationParameters *cur = &s->parameters;
>> -
>> - migrate_tls_opts_free(cur);
>> - qapi_free_BitmapMigrationNodeAliasList(cur->block_bitmap_mapping);
>> - qapi_free_strList(cur->cpr_exec_command);
>> -
>> - /* mark all present, so they're all copied */
>> - migrate_mark_all_params_present(params);
>> - QAPI_CLONE_MEMBERS(MigrationParameters, cur, params);
>> -}
>
> I actually like these smaller functions when their name can represent what
> it does (so I read less but know what it is doing faster).. But yeah if
> both of you like to drop it, I'm OK.
>
Yeah, I tend to agree with you. It's not a big deal anyway.
I want to eventually add a QMP-specific file to migration/ and move all
of the QMP command handlers in there. Having this all in one function
will be (_very slightly_) simpler to move later on.
> Reviewed-by: Peter Xu <peterx@redhat.com>
next prev parent reply other threads:[~2026-02-06 12:26 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-02 22:40 [PATCH v2 0/9] qapi: Use visitors for migration parameters handling Fabiano Rosas
2026-02-02 22:40 ` [PATCH v2 1/9] migration/options.c: Don't export migrate_tls_opts_free Fabiano Rosas
2026-02-05 20:19 ` Peter Xu
2026-02-02 22:40 ` [PATCH v2 2/9] migration: Use QAPI_CLONE_MEMBERS in migrate_params_test_apply Fabiano Rosas
2026-02-05 20:19 ` Peter Xu
2026-02-02 22:40 ` [PATCH v2 3/9] migration: Use QAPI_CLONE_MEMBERS in migrate_params_apply Fabiano Rosas
2026-02-02 22:40 ` [PATCH v2 4/9] qapi: Implement qapi_dealloc_present_visitor Fabiano Rosas
2026-02-05 21:45 ` Peter Xu
2026-02-06 12:19 ` Fabiano Rosas
2026-02-06 17:38 ` Peter Xu
2026-02-02 22:40 ` [PATCH v2 5/9] qapi: Add QAPI_MERGE Fabiano Rosas
2026-02-13 14:57 ` Markus Armbruster
2026-02-02 22:40 ` [PATCH v2 6/9] migration/options: Use QAPI_MERGE in migrate_params_test_apply Fabiano Rosas
2026-02-02 22:40 ` [PATCH v2 7/9] migration/options: Open code migrate_params_apply Fabiano Rosas
2026-02-05 22:14 ` Peter Xu
2026-02-06 12:25 ` Fabiano Rosas [this message]
2026-02-02 22:41 ` [PATCH v2 8/9] migration/options: Stop freeing s->parameters members individually Fabiano Rosas
2026-02-05 22:16 ` Peter Xu
2026-02-06 12:29 ` Fabiano Rosas
2026-02-06 16:20 ` Peter Xu
2026-02-06 19:50 ` Fabiano Rosas
2026-02-09 15:37 ` Peter Xu
2026-02-02 22:41 ` [PATCH v2 9/9] migration: Use migrate_params_free during finalize Fabiano Rosas
2026-02-05 22:21 ` Peter Xu
2026-02-05 22:05 ` [PATCH v2 0/9] qapi: Use visitors for migration parameters handling Peter Xu
2026-02-06 12:34 ` Fabiano Rosas
2026-02-06 17:40 ` Peter Xu
2026-02-06 18:36 ` Fabiano Rosas
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=87cy2iqcsa.fsf@suse.de \
--to=farosas@suse.de \
--cc=armbru@redhat.com \
--cc=peterx@redhat.com \
--cc=ppandit@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.