From: Steven Sistare <steven.sistare@oracle.com>
To: Peter Xu <peterx@redhat.com>
Cc: qemu-devel@nongnu.org, Fabiano Rosas <farosas@suse.de>,
Leonardo Bras <leobras@redhat.com>
Subject: Re: [PATCH V1] migration: export fewer options
Date: Mon, 26 Feb 2024 11:45:59 -0500 [thread overview]
Message-ID: <bf0a5747-f1be-4a27-a2b8-fcd5103d4997@oracle.com> (raw)
In-Reply-To: <Zdv6OyvFG98siqc2@x1n>
On 2/25/2024 9:40 PM, Peter Xu wrote:
> On Fri, Feb 23, 2024 at 09:13:24AM -0800, Steve Sistare wrote:
>> A small number of migration options are accessed by migration clients,
>> but to see them clients must include all of options.h, which is mostly
>> for migration core code. migrate_mode() in particular will be needed by
>> multiple clients.
>>
>> Refactor the option declarations so clients can see the necessary few via
>> misc.h, which already exports a portion of the client API.
>>
>> Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
>
> Sounds reasonable, queued, thanks.
>
>> ---
>> I suggest that eventually we should define a single file migration/client.h
>> which exports everything needed by the simpler clients: blockers, notifiers,
>> options, cpr, and state accessors.
>
> What's the difference v.s. current migration/misc.h?
This file would be sufficient for most clients:
diff --git a/include/migration/client.h b/include/migration/client.h
new file mode 100644
index 0000000..a55e504
--- /dev/null
+++ b/include/migration/client.h
@@ -0,0 +1,6 @@
+#ifndef MIGRATION_CLIENT_H
+#define MIGRATION_CLIENT_H
+#include "migration/misc.h"
+#include "migration/blocker.h"
+#include "migration/client-options.h"
+#endif
Or, we could rename misc.h -> client.h and include blocker.h and client-options.h in it.
I just like the idea that most clients could include a single, obviously named file to
use the most-common exported API. "misc.h" is not obvious, and not complete.
- Steve
next prev parent reply other threads:[~2024-02-26 16:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-23 17:13 [PATCH V1] migration: export fewer options Steve Sistare
2024-02-26 2:40 ` Peter Xu
2024-02-26 16:45 ` Steven Sistare [this message]
2024-02-26 7:40 ` Markus Armbruster
2024-02-26 14:41 ` Steven Sistare
2024-02-27 8:08 ` Peter Xu
2024-02-27 13:15 ` Steven Sistare
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=bf0a5747-f1be-4a27-a2b8-fcd5103d4997@oracle.com \
--to=steven.sistare@oracle.com \
--cc=farosas@suse.de \
--cc=leobras@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).