From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33385) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gZ9Q1-0005W3-UB for qemu-devel@nongnu.org; Tue, 18 Dec 2018 02:03:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gZ9Pv-00045J-CA for qemu-devel@nongnu.org; Tue, 18 Dec 2018 02:03:51 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36902) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gZ9Pn-0003xl-Eg for qemu-devel@nongnu.org; Tue, 18 Dec 2018 02:03:41 -0500 From: Markus Armbruster References: <20181213184340.24037-1-armbru@redhat.com> <20181213184340.24037-33-armbru@redhat.com> Date: Tue, 18 Dec 2018 08:03:30 +0100 In-Reply-To: (=?utf-8?Q?=22Marc-Andr=C3=A9?= Lureau"'s message of "Mon, 17 Dec 2018 22:38:14 +0400") Message-ID: <877eg7jozh.fsf@dusky.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PULL 32/32] qapi: add conditions to REPLICATION type/commands on the schema List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?utf-8?Q?Marc-Andr=C3=A9?= Lureau Cc: Thomas Huth , Peter Maydell , QEMU Marc-Andr=C3=A9 Lureau writes: > Hi > > On Mon, Dec 17, 2018 at 8:01 PM Thomas Huth wrote: >> >> On 2018-12-13 19:43, Markus Armbruster wrote: >> > From: Marc-Andr=C3=A9 Lureau >> > >> > Add #if defined(CONFIG_REPLICATION) in generated code, and adjust the >> > code accordingly. >> > >> > Made conditional: >> > >> > * xen-set-replication, query-xen-replication-status, >> > xen-colo-do-checkpoint >> > >> > Before the patch, we first register the commands unconditionally in >> > generated code (requires a stub), then conditionally unregister in >> > qmp_unregister_commands_hack(). >> > >> > Afterwards, we register only when CONFIG_REPLICATION. The command >> > fails exactly the same, with CommandNotFound. >> > >> > Improvement, because now query-qmp-schema is accurate, and we're one >> > step closer to killing qmp_unregister_commands_hack(). >> > >> > * enum BlockdevDriver value "replication" in command blockdev-add >> > >> > * BlockdevOptions variant @replication >> > >> > and related structures. >> > >> > Signed-off-by: Marc-Andr=C3=A9 Lureau >> > Reviewed-by: Markus Armbruster >> > Message-Id: <20181213123724.4866-23-marcandre.lureau@redhat.com> >> > Signed-off-by: Markus Armbruster >> > --- >> > migration/colo.c | 16 ++++------------ >> > monitor.c | 5 ----- >> > qapi/block-core.json | 13 +++++++++---- >> > qapi/migration.json | 12 ++++++++---- >> > 4 files changed, 21 insertions(+), 25 deletions(-) >> >> I think this might have broken compilation with --disable-replication: >> >> https://gitlab.com/huth/qemu/-/jobs/135648240 >> >> Any ideas how to fix it? > > We introduced a regression by dropping osdep.h include from headers. > > To me, it's best to include osdep.h in headers, since the ifdef exist > there. But I have been told we include it in .c instead. I'll upstream > the qapi/scripts to include it. This can't be the cause: qapi/qapi-visit-block-core.c includes osdep.h first, like all our .c files. > thanks for the report, sorry for the regression You've since posted a fix to add the missing ifdeffery. I'm testing it while I write :)