From nobody Sun May 19 09:58:19 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1697543606; cv=none; d=zohomail.com; s=zohoarc; b=Tyi3FeCMtEmemMilKsch6CYrdFtPW7usQcCvYOCccWR3wBzHI2DS2tUesn8/U4X1z+S//YXzhQqfbZuB4G32Nu7yUSNi9Jgiimhmo/AWjikwM3ueUqFwm8Vcx6DtxBc1xtaoGPbAhfxnTBKrxq2+sESIb3mRJ6iHAXESKKi2kY0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1697543606; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=zE1SWm+UBDP4t3TIq4lWGMqfYti9vzYIkPK5BEUZ/hI=; b=EkmIjUS0+286B2QQdQ5+s0XUloRc+IQ8PqNSbE/K2nspewC1YfTxjKvMa5shMjjy3LgYg66XbAop/YvAvl5Uh/TpigcIAgwwdQiN65Steitsu83VZyOyDa1XNm87TjOvFs8bK7KhMTwwnioAmRrJAMmAdVNDSYITMRm0heSOWSg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1697543606751898.9255661212511; Tue, 17 Oct 2023 04:53:26 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qsid3-000465-9Q; Tue, 17 Oct 2023 07:52:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qsid1-00045N-0q for qemu-devel@nongnu.org; Tue, 17 Oct 2023 07:52:52 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qsicz-0004sJ-FV for qemu-devel@nongnu.org; Tue, 17 Oct 2023 07:52:50 -0400 Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-157-s3oeJISHPOuJtMppUHcsmA-1; Tue, 17 Oct 2023 07:52:44 -0400 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 06F833826D37; Tue, 17 Oct 2023 11:52:44 +0000 (UTC) Received: from secure.mitica (unknown [10.39.194.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id 42832492BFA; Tue, 17 Oct 2023 11:52:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697543568; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zE1SWm+UBDP4t3TIq4lWGMqfYti9vzYIkPK5BEUZ/hI=; b=ZKYThmspsywpNDmuhIieZF6qOEAbx3b8bCHpHpojpDsxSJ6ezdnbDye3z672RtXJ2IO25C DORt/vmjPiG6tXz5JYrJjxBTGrVErwupMk1J7Ux15mPoePKG/B755rV4gFK6w9Mc8El+D1 Ex4WhWyjewVdy0jMiMPGWqxAG4siAkQ= X-MC-Unique: s3oeJISHPOuJtMppUHcsmA-1 From: Juan Quintela To: qemu-devel@nongnu.org Cc: libvir-list@redhat.com, Leonardo Bras , Juan Quintela , Markus Armbruster , Peter Xu , Fam Zheng , Stefan Hajnoczi , Eric Blake , qemu-block@nongnu.org, Fabiano Rosas Subject: [PATCH v5 1/7] migration: Print block status when needed Date: Tue, 17 Oct 2023 13:52:32 +0200 Message-ID: <20231017115238.18309-2-quintela@redhat.com> In-Reply-To: <20231017115238.18309-1-quintela@redhat.com> References: <20231017115238.18309-1-quintela@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.10 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=quintela@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1697543607828100001 Content-Type: text/plain; charset="utf-8" The new line was only printed when command options were used. When we used migration parameters and capabilities, it wasn't. Signed-off-by: Juan Quintela Reviewed-by: Fabiano Rosas --- migration/migration-hmp-cmds.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/migration/migration-hmp-cmds.c b/migration/migration-hmp-cmds.c index d206700a43..a82597f18e 100644 --- a/migration/migration-hmp-cmds.c +++ b/migration/migration-hmp-cmds.c @@ -30,6 +30,7 @@ #include "sysemu/runstate.h" #include "ui/qemu-spice.h" #include "sysemu/sysemu.h" +#include "options.h" #include "migration.h" =20 static void migration_global_dump(Monitor *mon) @@ -696,7 +697,6 @@ void hmp_x_colo_lost_heartbeat(Monitor *mon, const QDic= t *qdict) typedef struct HMPMigrationStatus { QEMUTimer *timer; Monitor *mon; - bool is_block_migration; } HMPMigrationStatus; =20 static void hmp_migrate_status_cb(void *opaque) @@ -722,7 +722,7 @@ static void hmp_migrate_status_cb(void *opaque) =20 timer_mod(status->timer, qemu_clock_get_ms(QEMU_CLOCK_REALTIME) + = 1000); } else { - if (status->is_block_migration) { + if (migrate_block()) { monitor_printf(status->mon, "\n"); } if (info->error_desc) { @@ -762,7 +762,6 @@ void hmp_migrate(Monitor *mon, const QDict *qdict) =20 status =3D g_malloc0(sizeof(*status)); status->mon =3D mon; - status->is_block_migration =3D blk || inc; status->timer =3D timer_new_ms(QEMU_CLOCK_REALTIME, hmp_migrate_st= atus_cb, status); timer_mod(status->timer, qemu_clock_get_ms(QEMU_CLOCK_REALTIME)); --=20 2.41.0 From nobody Sun May 19 09:58:19 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1697543699; cv=none; d=zohomail.com; s=zohoarc; b=JhzXG68gOuEul5MZlx8q5e/9UEMOtpaoQrNSNZ7iBtj1APmCE6t/CExFxy6XZiaqTPVO2cxtXao5YA83L5HfojS6XHysCEtsz+UNE/ckKO+9EIL/nfcCWodVu6m6bvIPUCy93FDTLbpzaJ8ToZOWxbEYBfbZ+VRbmUYCHJan1v4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1697543699; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=y7Qo5HemeGcHAwzqldGF13HIgi7pmGCs5THCWzq5UO0=; b=GPtG4urmlrNmjbfmLQyNnytYoDzy+gOKsd/TxYphNuCEYP5ERB5CMDRjTvqSUO0NGiGcY9J4l9egqT+yDIFFMUzp75LJD0AEosJZLQXqABm4qqZDS+06mNOMv0J2v7dRE/MdCw9lp96jaxrpJwZK6Zb7374UREzjUpnegyrFOSo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1697543699668267.5484384486409; Tue, 17 Oct 2023 04:54:59 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qsid6-00047G-F6; Tue, 17 Oct 2023 07:52:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qsid1-00045L-0T for qemu-devel@nongnu.org; Tue, 17 Oct 2023 07:52:52 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qsicz-0004sM-Dp for qemu-devel@nongnu.org; Tue, 17 Oct 2023 07:52:50 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-588-uiix3Oy_OdKTEtRiPNr7Ew-1; Tue, 17 Oct 2023 07:52:46 -0400 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 318698F15D5; Tue, 17 Oct 2023 11:52:46 +0000 (UTC) Received: from secure.mitica (unknown [10.39.194.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id 48735492BFA; Tue, 17 Oct 2023 11:52:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697543568; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=y7Qo5HemeGcHAwzqldGF13HIgi7pmGCs5THCWzq5UO0=; b=FAcYbBdLvpUiBMRDwmP6GtF/OXLCBHiGG2/48adfmrIRO+11lXIig/JiOaIikecwBdJy4b xMp/LDpEp6B+z2B1tJHyTp+710FuTjFLlj7DZ8Z0RiJTcQJT1zpjf2nkoe27X0jT6TOUIj /gt1kJOWkynsCrx9FUvnQMnb7S36JH4= X-MC-Unique: uiix3Oy_OdKTEtRiPNr7Ew-1 From: Juan Quintela To: qemu-devel@nongnu.org Cc: libvir-list@redhat.com, Leonardo Bras , Juan Quintela , Markus Armbruster , Peter Xu , Fam Zheng , Stefan Hajnoczi , Eric Blake , qemu-block@nongnu.org, Fabiano Rosas , Thomas Huth Subject: [PATCH v5 2/7] migration: migrate 'inc' command option is deprecated. Date: Tue, 17 Oct 2023 13:52:33 +0200 Message-ID: <20231017115238.18309-3-quintela@redhat.com> In-Reply-To: <20231017115238.18309-1-quintela@redhat.com> References: <20231017115238.18309-1-quintela@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.10 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=quintela@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1697543700738100002 Content-Type: text/plain; charset="utf-8" Use blockdev-mirror with NBD instead. Reviewed-by: Thomas Huth Acked-by: Stefan Hajnoczi Signed-off-by: Juan Quintela Reviewed-by: Markus Armbruster --- Improve documentation and style (thanks Markus) --- docs/about/deprecated.rst | 8 ++++++++ qapi/migration.json | 8 +++++++- migration/migration-hmp-cmds.c | 5 +++++ migration/migration.c | 5 +++++ 4 files changed, 25 insertions(+), 1 deletion(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index 2febd2d12f..fc6adf1dea 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -461,3 +461,11 @@ Migration ``skipped`` field in Migration stats has been deprecated. It hasn't been used for more than 10 years. =20 +``inc`` migrate command option (since 8.2) +'''''''''''''''''''''''''''''''''''''''''' + +Use blockdev-mirror with NBD instead. + +As an intermediate step the ``inc`` functionality can be achieved by +setting the ``block-incremental`` migration parameter to ``true``. +But this parameter is also deprecated. diff --git a/qapi/migration.json b/qapi/migration.json index db3df12d6c..fa7f4f2575 100644 --- a/qapi/migration.json +++ b/qapi/migration.json @@ -1524,6 +1524,11 @@ # # @resume: resume one paused migration, default "off". (since 3.0) # +# Features: +# +# @deprecated: Member @inc is deprecated. Use blockdev-mirror with +# NBD instead. +# # Returns: nothing on success # # Since: 0.14 @@ -1545,7 +1550,8 @@ # <- { "return": {} } ## { 'command': 'migrate', - 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', + 'data': {'uri': 'str', '*blk': 'bool', + '*inc': { 'type': 'bool', 'features': [ 'deprecated' ] }, '*detach': 'bool', '*resume': 'bool' } } =20 ## diff --git a/migration/migration-hmp-cmds.c b/migration/migration-hmp-cmds.c index a82597f18e..fee7079afa 100644 --- a/migration/migration-hmp-cmds.c +++ b/migration/migration-hmp-cmds.c @@ -745,6 +745,11 @@ void hmp_migrate(Monitor *mon, const QDict *qdict) const char *uri =3D qdict_get_str(qdict, "uri"); Error *err =3D NULL; =20 + if (inc) { + warn_report("option '-i' is deprecated. Use 'blockdev-mirror + NB= D'" + " instead."); + } + qmp_migrate(uri, !!blk, blk, !!inc, inc, false, false, true, resume, &err); if (hmp_handle_error(mon, err)) { diff --git a/migration/migration.c b/migration/migration.c index 6ba5e145ac..b8b3ba58df 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -1603,6 +1603,11 @@ static bool migrate_prepare(MigrationState *s, bool = blk, bool blk_inc, { Error *local_err =3D NULL; =20 + if (blk_inc) { + warn_report("parameter 'inc' is deprecated. Use blockdev-mirror w= ith" + " NBD instead"); + } + if (resume) { if (s->state !=3D MIGRATION_STATUS_POSTCOPY_PAUSED) { error_setg(errp, "Cannot resume if there is no " --=20 2.41.0 From nobody Sun May 19 09:58:19 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1697543649; cv=none; d=zohomail.com; s=zohoarc; b=QI4qPYvP1RFthlCEefzRU7TzlkoEiCKLzHIwcP5cE2PUFB9vhHtExV846vwH94qSejAW+ivcT8iuP4XntUc5GuNh/D1XOk/hF2LuJ5O23mwnnw/ui2/Ur+S54Ob+k+Z7/YtKc3399rWpe6bGIGdllQHz88AK2sLe2J2hkJneeNo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1697543649; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=jJ4O/RVfZpK+CCyz8O3xdNj9Fo+6quHJbCQvwEeg1jY=; b=a6oJjUp7C6/I0YE8YHbxolSG/6w+tDKhv11lU9JIukGVCz9aQ5uza6lHH9roZvIAX6y5gZRUBY7oXfy/9aM56Vr3pavkdUZ3Me2gsmoH9vMNw7kCw2wtnLq40UYxE7cD7f0+K6TshiP2U4VownJkEe+yQo8z9nOGO6Rl5rGccQo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1697543649412970.0229021750142; Tue, 17 Oct 2023 04:54:09 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qsid7-00047K-0D; Tue, 17 Oct 2023 07:52:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qsid4-00046R-8j for qemu-devel@nongnu.org; Tue, 17 Oct 2023 07:52:54 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qsid2-0004uu-Oz for qemu-devel@nongnu.org; Tue, 17 Oct 2023 07:52:54 -0400 Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-325-Y9suBFTaNwaSZ-ZyvlA6HA-1; Tue, 17 Oct 2023 07:52:48 -0400 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5D6892825E80; Tue, 17 Oct 2023 11:52:48 +0000 (UTC) Received: from secure.mitica (unknown [10.39.194.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id 71794492BFA; Tue, 17 Oct 2023 11:52:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697543572; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jJ4O/RVfZpK+CCyz8O3xdNj9Fo+6quHJbCQvwEeg1jY=; b=gvYrgNAJoPp+8J4m2h3dzrIHKjDGpCHt4vUVBDF0n3ULeKWuMH6VZstO1IoMcZX3+XlXi2 WqPFCB29z0w5rKE452YljELuTevyKDez0ZUAHsiOIgPjT1OY8i+eYHKmLWh/xT28IuuHPs bAgzx5AmQF2ovWeKVT04e3chzH4w1R8= X-MC-Unique: Y9suBFTaNwaSZ-ZyvlA6HA-1 From: Juan Quintela To: qemu-devel@nongnu.org Cc: libvir-list@redhat.com, Leonardo Bras , Juan Quintela , Markus Armbruster , Peter Xu , Fam Zheng , Stefan Hajnoczi , Eric Blake , qemu-block@nongnu.org, Fabiano Rosas , Thomas Huth Subject: [PATCH v5 3/7] migration: migrate 'blk' command option is deprecated. Date: Tue, 17 Oct 2023 13:52:34 +0200 Message-ID: <20231017115238.18309-4-quintela@redhat.com> In-Reply-To: <20231017115238.18309-1-quintela@redhat.com> References: <20231017115238.18309-1-quintela@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.10 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=quintela@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1697543650232100001 Content-Type: text/plain; charset="utf-8" Use blocked-mirror with NBD instead. Signed-off-by: Juan Quintela Acked-by: Stefan Hajnoczi Reviewed-by: Thomas Huth Reviewed-by: Markus Armbruster --- Improve documentation and style (markus) --- docs/about/deprecated.rst | 10 ++++++++++ qapi/migration.json | 6 ++++-- migration/migration-hmp-cmds.c | 5 +++++ migration/migration.c | 5 +++++ 4 files changed, 24 insertions(+), 2 deletions(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index fc6adf1dea..0149f040b6 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -469,3 +469,13 @@ Use blockdev-mirror with NBD instead. As an intermediate step the ``inc`` functionality can be achieved by setting the ``block-incremental`` migration parameter to ``true``. But this parameter is also deprecated. + +``blk`` migrate command option (since 8.2) +'''''''''''''''''''''''''''''''''''''''''' + +Use blockdev-mirror with NBD instead. + +As an intermediate step the ``blk`` functionality can be achieved by +setting the ``block`` migration capability to ``true``. +But this capability is also deprecated. + diff --git a/qapi/migration.json b/qapi/migration.json index fa7f4f2575..59a07b50f0 100644 --- a/qapi/migration.json +++ b/qapi/migration.json @@ -1527,7 +1527,8 @@ # Features: # # @deprecated: Member @inc is deprecated. Use blockdev-mirror with -# NBD instead. +# NBD instead. Member @blk is deprecated. Use blockdev-mirror +# with NBD instead. # # Returns: nothing on success # @@ -1550,7 +1551,8 @@ # <- { "return": {} } ## { 'command': 'migrate', - 'data': {'uri': 'str', '*blk': 'bool', + 'data': {'uri': 'str', + '*blk': { 'type': 'bool', 'features': [ 'deprecated' ] }, '*inc': { 'type': 'bool', 'features': [ 'deprecated' ] }, '*detach': 'bool', '*resume': 'bool' } } =20 diff --git a/migration/migration-hmp-cmds.c b/migration/migration-hmp-cmds.c index fee7079afa..bfeb1a476a 100644 --- a/migration/migration-hmp-cmds.c +++ b/migration/migration-hmp-cmds.c @@ -750,6 +750,11 @@ void hmp_migrate(Monitor *mon, const QDict *qdict) " instead."); } =20 + if (blk) { + warn_report("option '-b' is deprecated. Use 'blockdev-mirror + NB= D'" + " instead."); + } + qmp_migrate(uri, !!blk, blk, !!inc, inc, false, false, true, resume, &err); if (hmp_handle_error(mon, err)) { diff --git a/migration/migration.c b/migration/migration.c index b8b3ba58df..4da7fcfe0f 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -1608,6 +1608,11 @@ static bool migrate_prepare(MigrationState *s, bool = blk, bool blk_inc, " NBD instead"); } =20 + if (blk) { + warn_report("capability 'blk is deprecated. Use blockdev-mirror w= ith" + " NBD instead"); + } + if (resume) { if (s->state !=3D MIGRATION_STATUS_POSTCOPY_PAUSED) { error_setg(errp, "Cannot resume if there is no " --=20 2.41.0 From nobody Sun May 19 09:58:20 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1697543635; cv=none; d=zohomail.com; s=zohoarc; b=O/ySja7U3ytKQoMY6NoiNsv87XLUhiFm6ucYPZILSAHaSFFoMvjsHS53PHtfzLvwdqRHamrYJhnVhuMBesSAFBKEgYiSwUO4LMgfw20PnPzSZ1RGoz1onvBVpvRW+2Ww7AARJqLGSMEZ0OtCrzZW354sWsjo/ZNWvCQ8a25OZ9c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1697543635; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=MF8BZ1Ml3OdkqZp1OMbtekKsgQYizUs+Hd384vpth8o=; b=VLXmOA00q1mXvXSurtmT4mKJM8VNA4/rQlZjLeWwEa5rOjzemuz+uI2Z0WS2Xkhot2oi4xlWADEH5Af66lboCZ8pcUlY7v2jfiXRvelqzarN9AeEBhHrFAJFGvOuPdy3vVPpWu2klCwYhrWPz10H21Ap84zHscnIvwHJXRIRsbU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1697543635258830.3096433937249; Tue, 17 Oct 2023 04:53:55 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qsidE-0004BT-MH; Tue, 17 Oct 2023 07:53:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qsidC-0004Aw-Np for qemu-devel@nongnu.org; Tue, 17 Oct 2023 07:53:02 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qsidA-00051s-UI for qemu-devel@nongnu.org; Tue, 17 Oct 2023 07:53:02 -0400 Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-34-aMbrY0NwM3qijgFM6SbPSg-1; Tue, 17 Oct 2023 07:52:51 -0400 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CB68329AB42D; Tue, 17 Oct 2023 11:52:50 +0000 (UTC) Received: from secure.mitica (unknown [10.39.194.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id A2EE4492BFA; Tue, 17 Oct 2023 11:52:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697543580; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MF8BZ1Ml3OdkqZp1OMbtekKsgQYizUs+Hd384vpth8o=; b=SziBLRNiU/5AKIYrIoBDLIT5rjUsN1npGeo+s1UTjzj8+sDShdqUHHiC7ViaEdhKQ+eByo obqbTzcjcOA6xuWBAXa/YB44s+n9E8ESA6qvyJgXoGd87s5OoaXAMt7Ii9AQ9Jie622N/P 2P5Xo+a78amo+yuXcSrOmyeZcldeLqI= X-MC-Unique: aMbrY0NwM3qijgFM6SbPSg-1 From: Juan Quintela To: qemu-devel@nongnu.org Cc: libvir-list@redhat.com, Leonardo Bras , Juan Quintela , Markus Armbruster , Peter Xu , Fam Zheng , Stefan Hajnoczi , Eric Blake , qemu-block@nongnu.org, Fabiano Rosas , Kevin Wolf , Hanna Czenczek Subject: [PATCH v5 4/7] migration: Deprecate block migration Date: Tue, 17 Oct 2023 13:52:35 +0200 Message-ID: <20231017115238.18309-5-quintela@redhat.com> In-Reply-To: <20231017115238.18309-1-quintela@redhat.com> References: <20231017115238.18309-1-quintela@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.10 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=quintela@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1697543636090100001 Content-Type: text/plain; charset="utf-8" It is obsolete. It is better to use driver-mirror with NBD instead. CC: Kevin Wolf CC: Eric Blake CC: Stefan Hajnoczi CC: Hanna Czenczek Signed-off-by: Juan Quintela Acked-by: Stefan Hajnoczi Reviewed-by: Markus Armbruster --- docs/about/deprecated.rst | 10 ++++++++++ qapi/migration.json | 29 ++++++++++++++++++++++++----- migration/block.c | 3 +++ migration/options.c | 9 ++++++++- 4 files changed, 45 insertions(+), 6 deletions(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index 0149f040b6..5eaf096040 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -479,3 +479,13 @@ As an intermediate step the ``blk`` functionality can = be achieved by setting the ``block`` migration capability to ``true``. But this capability is also deprecated. =20 +block migration (since 8.2) +''''''''''''''''''''''''''' + +Block migration is too inflexible. It needs to migrate all block +devices or none. + +Please see "QMP invocation for live storage migration with +``blockdev-mirror`` + NBD" in docs/interop/live-block-operations.rst +for a detailed explanation. + diff --git a/qapi/migration.json b/qapi/migration.json index 59a07b50f0..c7633b22c0 100644 --- a/qapi/migration.json +++ b/qapi/migration.json @@ -269,11 +269,15 @@ # average memory load of the virtual CPU indirectly. Note that # zero means guest doesn't dirty memory. (Since 8.1) # +# Features: +# +# @deprecated: Member @disk is deprecated because block migration is. +# # Since: 0.14 ## { 'struct': 'MigrationInfo', 'data': {'*status': 'MigrationStatus', '*ram': 'MigrationStats', - '*disk': 'MigrationStats', + '*disk': { 'type': 'MigrationStats', 'features': [ 'deprecated'= ] }, '*vfio': 'VfioStats', '*xbzrle-cache': 'XBZRLECacheStats', '*total-time': 'int', @@ -525,6 +529,9 @@ # # Features: # +# @deprecated: Member @block is deprecated. Use blockdev-mirror with +# NBD instead. +# # @unstable: Members @x-colo and @x-ignore-shared are experimental. # # Since: 1.2 @@ -534,7 +541,8 @@ 'compress', 'events', 'postcopy-ram', { 'name': 'x-colo', 'features': [ 'unstable' ] }, 'release-ram', - 'block', 'return-path', 'pause-before-switchover', 'multifd', + { 'name': 'block', 'features': [ 'deprecated' ] }, + 'return-path', 'pause-before-switchover', 'multifd', 'dirty-bitmaps', 'postcopy-blocktime', 'late-block-activate', { 'name': 'x-ignore-shared', 'features': [ 'unstable' ] }, 'validate-uuid', 'background-snapshot', @@ -835,6 +843,9 @@ # # Features: # +# @deprecated: Member @block-incremental is deprecated. Use +# blockdev-mirror with NBD instead. +# # @unstable: Members @x-checkpoint-delay and @x-vcpu-dirty-limit-period # are experimental. # @@ -850,7 +861,7 @@ 'tls-creds', 'tls-hostname', 'tls-authz', 'max-bandwidth', 'avail-switchover-bandwidth', 'downtime-limit', { 'name': 'x-checkpoint-delay', 'features': [ 'unstable' ] }, - 'block-incremental', + { 'name': 'block-incremental', 'features': [ 'deprecated' ] }, 'multifd-channels', 'xbzrle-cache-size', 'max-postcopy-bandwidth', 'max-cpu-throttle', 'multifd-compression', @@ -1011,6 +1022,9 @@ # # Features: # +# @deprecated: Member @block-incremental is deprecated. Use +# blockdev-mirror with NBD instead. +# # @unstable: Members @x-checkpoint-delay and @x-vcpu-dirty-limit-period # are experimental. # @@ -1040,7 +1054,8 @@ '*downtime-limit': 'uint64', '*x-checkpoint-delay': { 'type': 'uint32', 'features': [ 'unstable' ] }, - '*block-incremental': 'bool', + '*block-incremental': { 'type': 'bool', + 'features': [ 'deprecated' ] }, '*multifd-channels': 'uint8', '*xbzrle-cache-size': 'size', '*max-postcopy-bandwidth': 'size', @@ -1225,6 +1240,9 @@ # # Features: # +# @deprecated: Member @block-incremental is deprecated. Use +# blockdev-mirror with NBD instead. +# # @unstable: Members @x-checkpoint-delay and @x-vcpu-dirty-limit-period # are experimental. # @@ -1251,7 +1269,8 @@ '*downtime-limit': 'uint64', '*x-checkpoint-delay': { 'type': 'uint32', 'features': [ 'unstable' ] }, - '*block-incremental': 'bool', + '*block-incremental': { 'type': 'bool', + 'features': [ 'deprecated' ] }, '*multifd-channels': 'uint8', '*xbzrle-cache-size': 'size', '*max-postcopy-bandwidth': 'size', diff --git a/migration/block.c b/migration/block.c index b60698d6e2..7682f4fbd2 100644 --- a/migration/block.c +++ b/migration/block.c @@ -731,6 +731,9 @@ static int block_save_setup(QEMUFile *f, void *opaque) trace_migration_block_save("setup", block_mig_state.submitted, block_mig_state.transferred); =20 + warn_report("block migration is deprecated. Use blockdev-mirror with" + "NBD instead."); + ret =3D init_blk_migration(f); if (ret < 0) { return ret; diff --git a/migration/options.c b/migration/options.c index 42fb818956..0d0a3f8edb 100644 --- a/migration/options.c +++ b/migration/options.c @@ -12,6 +12,7 @@ */ =20 #include "qemu/osdep.h" +#include "qemu/error-report.h" #include "exec/target_page.h" #include "qapi/clone-visitor.h" #include "qapi/error.h" @@ -473,10 +474,14 @@ bool migrate_caps_check(bool *old_caps, bool *new_cap= s, Error **errp) if (new_caps[MIGRATION_CAPABILITY_BLOCK]) { error_setg(errp, "QEMU compiled without old-style (blk/-b, inc/-i)= " "block migration"); - error_append_hint(errp, "Use drive_mirror+NBD instead.\n"); + error_append_hint(errp, "Use blockdev-mirror with NBD instead.\n"); return false; } #endif + if (new_caps[MIGRATION_CAPABILITY_BLOCK]) { + warn_report("Block migration is deprecated. " + "Use blockdev-mirror with NBD instead."); + } =20 #ifndef CONFIG_REPLICATION if (new_caps[MIGRATION_CAPABILITY_X_COLO]) { @@ -1386,6 +1391,8 @@ static void migrate_params_apply(MigrateSetParameters= *params, Error **errp) } =20 if (params->has_block_incremental) { + warn_report("Block migration is deprecated. " + "Use blockdev-mirror with NBD instead."); s->parameters.block_incremental =3D params->block_incremental; } if (params->has_multifd_channels) { --=20 2.41.0 From nobody Sun May 19 09:58:20 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1697543618; cv=none; d=zohomail.com; s=zohoarc; b=DiO54Pz6iXlL3/k6Rzf36hTzTGQermOOliLRoSFrILRyHGowj59YUYt5gYVQu7AY1tpkfvKdyP/LIdNL6T3JTFFwLkhkQ3mgfxP28OAZ6N2Xv7kqChjnrhak3rx8LJm6uf8lQQR3AEv3MZJ38/81eRxeep3CGAvs3VFASecW6n8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1697543618; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=aX+5UiIV+aWRjaABwcjfRHulEZzTZPdKv8T1n0VEzAc=; b=Fgzm5pRSydSuJlfEOyEWxJ9uZdQqugVPrO9r6Xc+JSCVAxXnOoFWJDLWy2FXH5iuGq/fXHTUN2xvbzJoXQ4dr6NURqvKKKukl3mZsZzlamtVFEDRs87ARWVEUFIfhzlAWNvooLl068f30Q1I3eawW+Y6477LKiXJ1HMrtI+4gqc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1697543618439891.7613460235191; Tue, 17 Oct 2023 04:53:38 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qsid9-00049f-RH; Tue, 17 Oct 2023 07:52:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qsid8-00047X-GG for qemu-devel@nongnu.org; Tue, 17 Oct 2023 07:52:58 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qsid6-0004wl-EK for qemu-devel@nongnu.org; Tue, 17 Oct 2023 07:52:58 -0400 Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-217-4-7K__kKPi2CbAHhrnk2vw-1; Tue, 17 Oct 2023 07:52:53 -0400 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id F29F13826D57; Tue, 17 Oct 2023 11:52:52 +0000 (UTC) Received: from secure.mitica (unknown [10.39.194.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id 187CE492BFA; Tue, 17 Oct 2023 11:52:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697543575; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aX+5UiIV+aWRjaABwcjfRHulEZzTZPdKv8T1n0VEzAc=; b=ILOnU3tvYYY8MPitmDt6YcSIAJjIgcAudE4MINnYLXT/bAiuwimDaj+3tNRxBXV9YrtEtD RyUHBfRwIuMu7CWzyBcXA0RYUJfF+mJejDhUdT32XL/YXQe5Aa6K803+qfgiXVXROXYiJy K3YyCwpinDhnCi15se3x7/+jZ72T+iY= X-MC-Unique: 4-7K__kKPi2CbAHhrnk2vw-1 From: Juan Quintela To: qemu-devel@nongnu.org Cc: libvir-list@redhat.com, Leonardo Bras , Juan Quintela , Markus Armbruster , Peter Xu , Fam Zheng , Stefan Hajnoczi , Eric Blake , qemu-block@nongnu.org, Fabiano Rosas Subject: [PATCH v5 5/7] migration: Deprecate old compression method Date: Tue, 17 Oct 2023 13:52:36 +0200 Message-ID: <20231017115238.18309-6-quintela@redhat.com> In-Reply-To: <20231017115238.18309-1-quintela@redhat.com> References: <20231017115238.18309-1-quintela@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.10 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=quintela@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1697543619957100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Juan Quintela Acked-by: Stefan Hajnoczi Acked-by: Peter Xu Reviewed-by: Markus Armbruster --- docs/about/deprecated.rst | 8 ++++ qapi/migration.json | 79 +++++++++++++++++++++++++-------------- migration/options.c | 13 +++++++ 3 files changed, 72 insertions(+), 28 deletions(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index 5eaf096040..f46baf9ee9 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -489,3 +489,11 @@ Please see "QMP invocation for live storage migration = with ``blockdev-mirror`` + NBD" in docs/interop/live-block-operations.rst for a detailed explanation. =20 +old compression method (since 8.2) +'''''''''''''''''''''''''''''''''' + +Compression method fails too much. Too many races. We are going to +remove it if nobody fixes it. For starters, migration-test +compression tests are disabled becase they fail randomly. If you need +compression, use multifd compression methods. + diff --git a/qapi/migration.json b/qapi/migration.json index c7633b22c0..834506a02b 100644 --- a/qapi/migration.json +++ b/qapi/migration.json @@ -272,6 +272,10 @@ # Features: # # @deprecated: Member @disk is deprecated because block migration is. +# Member @compression is deprecated because it is unreliable and +# untested. It is recommended to use multifd migration, which +# offers an alternative compression implementation that is +# reliable and tested. # # Since: 0.14 ## @@ -289,7 +293,7 @@ '*blocked-reasons': ['str'], '*postcopy-blocktime': 'uint32', '*postcopy-vcpu-blocktime': ['uint32'], - '*compression': 'CompressionStats', + '*compression': { 'type': 'CompressionStats', 'features': [ 'de= precated' ] }, '*socket-address': ['SocketAddress'], '*dirty-limit-throttle-time-per-round': 'uint64', '*dirty-limit-ring-full-time': 'uint64'} } @@ -530,7 +534,10 @@ # Features: # # @deprecated: Member @block is deprecated. Use blockdev-mirror with -# NBD instead. +# NBD instead. Member @compression is deprecated because it is +# unreliable and untested. It is recommended to use multifd +# migration, which offers an alternative compression +# implementation that is reliable and tested. # # @unstable: Members @x-colo and @x-ignore-shared are experimental. # @@ -538,7 +545,8 @@ ## { 'enum': 'MigrationCapability', 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks', - 'compress', 'events', 'postcopy-ram', + { 'name': 'compress', 'features': [ 'deprecated' ] }, + 'events', 'postcopy-ram', { 'name': 'x-colo', 'features': [ 'unstable' ] }, 'release-ram', { 'name': 'block', 'features': [ 'deprecated' ] }, @@ -844,7 +852,9 @@ # Features: # # @deprecated: Member @block-incremental is deprecated. Use -# blockdev-mirror with NBD instead. +# blockdev-mirror with NBD instead. Members @compress-level, +# @compress-threads, @decompress-threads and @compress-wait-thread +# are deprecated because @compression is deprecated. # # @unstable: Members @x-checkpoint-delay and @x-vcpu-dirty-limit-period # are experimental. @@ -854,8 +864,11 @@ { 'enum': 'MigrationParameter', 'data': ['announce-initial', 'announce-max', 'announce-rounds', 'announce-step', - 'compress-level', 'compress-threads', 'decompress-threads', - 'compress-wait-thread', 'throttle-trigger-threshold', + { 'name': 'compress-level', 'features': [ 'deprecated' ] }, + { 'name': 'compress-threads', 'features': [ 'deprecated' ] }, + { 'name': 'decompress-threads', 'features': [ 'deprecated' ] }, + { 'name': 'compress-wait-thread', 'features': [ 'deprecated' ] = }, + 'throttle-trigger-threshold', 'cpu-throttle-initial', 'cpu-throttle-increment', 'cpu-throttle-tailslow', 'tls-creds', 'tls-hostname', 'tls-authz', 'max-bandwidth', @@ -885,16 +898,16 @@ # @announce-step: Increase in delay (in milliseconds) between # subsequent packets in the announcement (Since 4.0) # -# @compress-level: compression level +# @compress-level: compression level. # -# @compress-threads: compression thread count +# @compress-threads: compression thread count. # # @compress-wait-thread: Controls behavior when all compression # threads are currently busy. If true (default), wait for a free # compression thread to become available; otherwise, send the page -# uncompressed. (Since 3.1) +# uncompressed. (Since 3.1) # -# @decompress-threads: decompression thread count +# @decompress-threads: decompression thread count. # # @throttle-trigger-threshold: The ratio of bytes_dirty_period and # bytes_xfer_period to trigger throttling. It is expressed as @@ -1023,7 +1036,9 @@ # Features: # # @deprecated: Member @block-incremental is deprecated. Use -# blockdev-mirror with NBD instead. +# blockdev-mirror with NBD instead. Members @compress-level, +# @compress-threads, @decompress-threads and @compress-wait-thread +# are deprecated because @compression is deprecated. # # @unstable: Members @x-checkpoint-delay and @x-vcpu-dirty-limit-period # are experimental. @@ -1038,10 +1053,14 @@ '*announce-max': 'size', '*announce-rounds': 'size', '*announce-step': 'size', - '*compress-level': 'uint8', - '*compress-threads': 'uint8', - '*compress-wait-thread': 'bool', - '*decompress-threads': 'uint8', + '*compress-level': { 'type': 'uint8', + 'features': [ 'deprecated' ] }, + '*compress-threads': { 'type': 'uint8', + 'features': [ 'deprecated' ] }, + '*compress-wait-thread': { 'type': 'bool', + 'features': [ 'deprecated' ] }, + '*decompress-threads': { 'type': 'uint8', + 'features': [ 'deprecated' ] }, '*throttle-trigger-threshold': 'uint8', '*cpu-throttle-initial': 'uint8', '*cpu-throttle-increment': 'uint8', @@ -1078,7 +1097,7 @@ # Example: # # -> { "execute": "migrate-set-parameters" , -# "arguments": { "compress-level": 1 } } +# "arguments": { "multifd-channels": 5 } } # <- { "return": {} } ## { 'command': 'migrate-set-parameters', 'boxed': true, @@ -1101,16 +1120,16 @@ # @announce-step: Increase in delay (in milliseconds) between # subsequent packets in the announcement (Since 4.0) # -# @compress-level: compression level +# @compress-level: compression level. # -# @compress-threads: compression thread count +# @compress-threads: compression thread count. # # @compress-wait-thread: Controls behavior when all compression # threads are currently busy. If true (default), wait for a free # compression thread to become available; otherwise, send the page -# uncompressed. (Since 3.1) +# uncompressed. (Since 3.1) # -# @decompress-threads: decompression thread count +# @decompress-threads: decompression thread count. # # @throttle-trigger-threshold: The ratio of bytes_dirty_period and # bytes_xfer_period to trigger throttling. It is expressed as @@ -1241,7 +1260,9 @@ # Features: # # @deprecated: Member @block-incremental is deprecated. Use -# blockdev-mirror with NBD instead. +# blockdev-mirror with NBD instead. Members @compress-level, +# @compress-threads, @decompress-threads and @compress-wait-thread +# are deprecated because @compression is deprecated. # # @unstable: Members @x-checkpoint-delay and @x-vcpu-dirty-limit-period # are experimental. @@ -1253,10 +1274,14 @@ '*announce-max': 'size', '*announce-rounds': 'size', '*announce-step': 'size', - '*compress-level': 'uint8', - '*compress-threads': 'uint8', - '*compress-wait-thread': 'bool', - '*decompress-threads': 'uint8', + '*compress-level': { 'type': 'uint8', + 'features': [ 'deprecated' ] }, + '*compress-threads': { 'type': 'uint8', + 'features': [ 'deprecated' ] }, + '*compress-wait-thread': { 'type': 'bool', + 'features': [ 'deprecated' ] }, + '*decompress-threads': { 'type': 'uint8', + 'features': [ 'deprecated' ] }, '*throttle-trigger-threshold': 'uint8', '*cpu-throttle-initial': 'uint8', '*cpu-throttle-increment': 'uint8', @@ -1296,10 +1321,8 @@ # # -> { "execute": "query-migrate-parameters" } # <- { "return": { -# "decompress-threads": 2, +# "multifd-channels": 2, # "cpu-throttle-increment": 10, -# "compress-threads": 8, -# "compress-level": 1, # "cpu-throttle-initial": 20, # "max-bandwidth": 33554432, # "downtime-limit": 300 diff --git a/migration/options.c b/migration/options.c index 0d0a3f8edb..7cb99a82a5 100644 --- a/migration/options.c +++ b/migration/options.c @@ -483,6 +483,11 @@ bool migrate_caps_check(bool *old_caps, bool *new_caps= , Error **errp) "Use blockdev-mirror with NBD instead."); } =20 + if (new_caps[MIGRATION_CAPABILITY_COMPRESS]) { + warn_report("Old compression method is deprecated. " + "Use multifd compression methods instead."); + } + #ifndef CONFIG_REPLICATION if (new_caps[MIGRATION_CAPABILITY_X_COLO]) { error_setg(errp, "QEMU compiled without replication module" @@ -1321,18 +1326,26 @@ static void migrate_params_apply(MigrateSetParamete= rs *params, Error **errp) /* TODO use QAPI_CLONE() instead of duplicating it inline */ =20 if (params->has_compress_level) { + warn_report("Old compression is deprecated. " + "Use multifd compression methods instead."); s->parameters.compress_level =3D params->compress_level; } =20 if (params->has_compress_threads) { + warn_report("Old compression is deprecated. " + "Use multifd compression methods instead."); s->parameters.compress_threads =3D params->compress_threads; } =20 if (params->has_compress_wait_thread) { + warn_report("Old compression is deprecated. " + "Use multifd compression methods instead."); s->parameters.compress_wait_thread =3D params->compress_wait_threa= d; } =20 if (params->has_decompress_threads) { + warn_report("Old compression is deprecated. " + "Use multifd compression methods instead."); s->parameters.decompress_threads =3D params->decompress_threads; } =20 --=20 2.41.0 From nobody Sun May 19 09:58:20 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1697543654; cv=none; d=zohomail.com; s=zohoarc; b=lJ2XODU36QTmSqJ8mhAYJKfbf26j/AwE14mLTxXgYxypt4Xae4iHK0g4J6VSMxaeNS3sSOpQ/+Ozq94xWWlFv3oLQgX0VqQ2unk9ntDnWRO3Adunvciv4WZ0jSXWze+Q0A7g/BarOdMoeaoZmLX/1GY4vbIWfjYmdN3HjPWrkPQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1697543654; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=1+cJc4h59iJvLcHk0gasNlshSNApwgXPsu3ucraHrtM=; b=NjAWUSx/6Nj6t1DvOJ2dpBklBFIHKHk0Eg0GEkU1/H6jqbl2Nk9ma7lyb/y9V4dW0ri3mLvKqfJQhlcBXdQ5/Vg+uzFhPJRKEZB5vLncIraVMh5YOjS1166W48+h3AWvT/FCQlWUjyZ2Ok89oulovLSq7ZpzFH4ouM0ZwtkSqlI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1697543654393575.75203925836; Tue, 17 Oct 2023 04:54:14 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qsidD-0004BC-7P; Tue, 17 Oct 2023 07:53:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qsidB-0004AI-IX for qemu-devel@nongnu.org; Tue, 17 Oct 2023 07:53:01 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qsid9-0004zN-A9 for qemu-devel@nongnu.org; Tue, 17 Oct 2023 07:53:01 -0400 Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-615-uUqQc4mjOJS5M04ggyCNeQ-1; Tue, 17 Oct 2023 07:52:55 -0400 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2150328EA6FA; Tue, 17 Oct 2023 11:52:55 +0000 (UTC) Received: from secure.mitica (unknown [10.39.194.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3F077492BFA; Tue, 17 Oct 2023 11:52:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697543578; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1+cJc4h59iJvLcHk0gasNlshSNApwgXPsu3ucraHrtM=; b=Ypx1SlZ4FmAN1OeJM1MJHqF86OJsTBlECG6c2doMnrWVvZFNzwohCXg/fe7WwGRzjW9/yN UFY+gCgLmJsgJvNfFOoXrj2+lDEDK2eldFKXluIZFa6VZhTppvwX90KBE0IHZzDXYpB9ft I/8da/bL/tBsUHOCgkFNkFNJpmBWmro= X-MC-Unique: uUqQc4mjOJS5M04ggyCNeQ-1 From: Juan Quintela To: qemu-devel@nongnu.org Cc: libvir-list@redhat.com, Leonardo Bras , Juan Quintela , Markus Armbruster , Peter Xu , Fam Zheng , Stefan Hajnoczi , Eric Blake , qemu-block@nongnu.org, Fabiano Rosas Subject: [PATCH v5 6/7] [RFC] migration: Make -i/-b an error for hmp and qmp Date: Tue, 17 Oct 2023 13:52:37 +0200 Message-ID: <20231017115238.18309-7-quintela@redhat.com> In-Reply-To: <20231017115238.18309-1-quintela@redhat.com> References: <20231017115238.18309-1-quintela@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.10 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=quintela@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1697543656261100001 Content-Type: text/plain; charset="utf-8" [DON'T MERGE] Block migration is obsolete, users should use blockdev-mirror instead. Make it one error to set them. Signed-off-by: Juan Quintela --- migration/migration-hmp-cmds.c | 13 +++++++------ migration/migration.c | 33 ++++++--------------------------- 2 files changed, 13 insertions(+), 33 deletions(-) diff --git a/migration/migration-hmp-cmds.c b/migration/migration-hmp-cmds.c index bfeb1a476a..0acc866c79 100644 --- a/migration/migration-hmp-cmds.c +++ b/migration/migration-hmp-cmds.c @@ -746,16 +746,17 @@ void hmp_migrate(Monitor *mon, const QDict *qdict) Error *err =3D NULL; =20 if (inc) { - warn_report("option '-i' is deprecated. Use 'blockdev-mirror + NB= D'" - " instead."); + monitor_printf(mon, "option '-i' is deprecated. Use" + " 'blockdev-mirror + NBD' instead."); + return; } =20 if (blk) { - warn_report("option '-b' is deprecated. Use 'blockdev-mirror + NB= D'" - " instead."); + monitor_printf(mon, "option '-b' is deprecated. Use" + " 'blockdev-mirror + NBD' instead."); + return; } - - qmp_migrate(uri, !!blk, blk, !!inc, inc, + qmp_migrate(uri, false, false, false, false, false, false, true, resume, &err); if (hmp_handle_error(mon, err)) { return; diff --git a/migration/migration.c b/migration/migration.c index 4da7fcfe0f..9a695299ba 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -1601,16 +1601,16 @@ bool migration_is_blocked(Error **errp) static bool migrate_prepare(MigrationState *s, bool blk, bool blk_inc, bool resume, Error **errp) { - Error *local_err =3D NULL; - if (blk_inc) { - warn_report("parameter 'inc' is deprecated. Use blockdev-mirror w= ith" - " NBD instead"); + error_setg(errp, "parameter 'inc' is deprecated. Use blockdev-mir= ror" + " with NBD instead"); + return false; } =20 if (blk) { - warn_report("capability 'blk is deprecated. Use blockdev-mirror w= ith" - " NBD instead"); + error_setg(errp, "capability 'blk is deprecated. Use blockdev-mir= ror" + " with NBD instead"); + return false; } =20 if (resume) { @@ -1662,27 +1662,6 @@ static bool migrate_prepare(MigrationState *s, bool = blk, bool blk_inc, return false; } =20 - if (blk || blk_inc) { - if (migrate_colo()) { - error_setg(errp, "No disk migration is required in COLO mode"); - return false; - } - if (migrate_block() || migrate_block_incremental()) { - error_setg(errp, "Command options are incompatible with " - "current migration capabilities"); - return false; - } - if (!migrate_cap_set(MIGRATION_CAPABILITY_BLOCK, true, &local_err)= ) { - error_propagate(errp, local_err); - return false; - } - s->must_remove_block_options =3D true; - } - - if (blk_inc) { - migrate_set_block_incremental(true); - } - if (migrate_init(s, errp)) { return false; } --=20 2.41.0 From nobody Sun May 19 09:58:20 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1697543682; cv=none; d=zohomail.com; s=zohoarc; b=HD2fBKA3PZTvnilAgcNkMDx9H3sN+Fqlcu2shluBNhPtoK867xJgO5h0AwkrHfv06Gz7baqGzGZTbOLIjdlmli7aYVeE9YQznEgx3dIsl2tKCG+3l6IoQtYccSGyURq9/DgDcyRqH1X67j4/o6l2aKfDKUWrw4BW/A9bTWWOz+k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1697543682; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=96sXareEzivDc8DjJq1hued/pCJZ9cpHZ6xjlPCp5jI=; b=FwomvGOBlFpCXJr7cA/qtjNMdVrHRV/3v81sMWfno0nY5l65X0E09rw2jkHrXTZHtyBg9UFkBnKR6/qwNFBKa2JxpmNzzps8ReCoGx4xXYtAilKgXV2ixmrwD1iu4RHxFbjzvvQhumwDcLJtowgQHWwvfsHQmFymm+ivCdHv5Ms= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1697543682965289.8176863950205; Tue, 17 Oct 2023 04:54:42 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qsidW-0004TT-4s; Tue, 17 Oct 2023 07:53:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qsidU-0004Od-6L for qemu-devel@nongnu.org; Tue, 17 Oct 2023 07:53:20 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qsidR-00054M-EH for qemu-devel@nongnu.org; Tue, 17 Oct 2023 07:53:19 -0400 Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-339-NZz9beRsOzSjDHgnIjxueQ-1; Tue, 17 Oct 2023 07:52:58 -0400 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 591973C170BC; Tue, 17 Oct 2023 11:52:57 +0000 (UTC) Received: from secure.mitica (unknown [10.39.194.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id 618C2492BFA; Tue, 17 Oct 2023 11:52:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697543596; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=96sXareEzivDc8DjJq1hued/pCJZ9cpHZ6xjlPCp5jI=; b=eZOYrPf1Uhmjyjii+TnQnbsv6fdNpfi0j03njAovg+CO1GU6eZS8m9/mCl/cPU3ggZdVT2 IKpXQs9P7H2KJyT1uQAzULk8LF40pdQ4jHdHJFd7oc6bFW2WSvWXGpSUWZ698VQQSLQ2Q1 vzW1vCfgL21520TEtej8GCe96NzVm4k= X-MC-Unique: NZz9beRsOzSjDHgnIjxueQ-1 From: Juan Quintela To: qemu-devel@nongnu.org Cc: libvir-list@redhat.com, Leonardo Bras , Juan Quintela , Markus Armbruster , Peter Xu , Fam Zheng , Stefan Hajnoczi , Eric Blake , qemu-block@nongnu.org, Fabiano Rosas Subject: [PATCH v5 7/7] [RFC] migration: Remove helpers needed for -i/-b migrate options Date: Tue, 17 Oct 2023 13:52:38 +0200 Message-ID: <20231017115238.18309-8-quintela@redhat.com> In-Reply-To: <20231017115238.18309-1-quintela@redhat.com> References: <20231017115238.18309-1-quintela@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.10 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=quintela@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1697543684661100003 Content-Type: text/plain; charset="utf-8" [DON'T MERGE] We were abusing capabilities and parameters to implement -i/-b. Previous patch convert that options into one error. Remove all the helpers needed to implement them. Signed-off-by: Juan Quintela --- migration/migration.h | 4 ---- migration/options.h | 6 ------ migration/migration.c | 2 -- migration/options.c | 41 ----------------------------------------- 4 files changed, 53 deletions(-) diff --git a/migration/migration.h b/migration/migration.h index ae82004892..937a3534c5 100644 --- a/migration/migration.h +++ b/migration/migration.h @@ -382,10 +382,6 @@ struct MigrationState { /* mutex to protect errp */ QemuMutex error_mutex; =20 - /* Do we have to clean up -b/-i from old migrate parameters */ - /* This feature is deprecated and will be removed */ - bool must_remove_block_options; - /* * Global switch on whether we need to store the global state * during migration. diff --git a/migration/options.h b/migration/options.h index 237f2d6b4a..e41ea38322 100644 --- a/migration/options.h +++ b/migration/options.h @@ -62,7 +62,6 @@ bool migrate_tls(void); /* capabilities helpers */ =20 bool migrate_caps_check(bool *old_caps, bool *new_caps, Error **errp); -bool migrate_cap_set(int cap, bool value, Error **errp); =20 /* parameters */ =20 @@ -93,14 +92,9 @@ const char *migrate_tls_creds(void); const char *migrate_tls_hostname(void); uint64_t migrate_xbzrle_cache_size(void); =20 -/* parameters setters */ - -void migrate_set_block_incremental(bool value); - /* parameters helpers */ =20 bool migrate_params_check(MigrationParameters *params, Error **errp); void migrate_params_init(MigrationParameters *params); -void block_cleanup_parameters(void); =20 #endif diff --git a/migration/migration.c b/migration/migration.c index 9a695299ba..9792bd98ca 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -1205,7 +1205,6 @@ static void migrate_fd_cleanup(MigrationState *s) error_report_err(error_copy(s->error)); } notifier_list_notify(&migration_state_notifiers, s); - block_cleanup_parameters(); yank_unregister_instance(MIGRATION_YANK_INSTANCE); } =20 @@ -1715,7 +1714,6 @@ void qmp_migrate(const char *uri, bool has_blk, bool = blk, "a valid migration protocol"); migrate_set_state(&s->state, MIGRATION_STATUS_SETUP, MIGRATION_STATUS_FAILED); - block_cleanup_parameters(); } =20 if (local_err) { diff --git a/migration/options.c b/migration/options.c index 7cb99a82a5..3be7e35f40 100644 --- a/migration/options.c +++ b/migration/options.c @@ -631,26 +631,6 @@ bool migrate_caps_check(bool *old_caps, bool *new_caps= , Error **errp) return true; } =20 -bool migrate_cap_set(int cap, bool value, Error **errp) -{ - MigrationState *s =3D migrate_get_current(); - bool new_caps[MIGRATION_CAPABILITY__MAX]; - - if (migration_is_running(s->state)) { - error_setg(errp, QERR_MIGRATION_ACTIVE); - return false; - } - - memcpy(new_caps, s->capabilities, sizeof(new_caps)); - new_caps[cap] =3D value; - - if (!migrate_caps_check(s->capabilities, new_caps, errp)) { - return false; - } - s->capabilities[cap] =3D value; - return true; -} - MigrationCapabilityStatusList *qmp_query_migrate_capabilities(Error **errp) { MigrationCapabilityStatusList *head =3D NULL, **tail =3D &head; @@ -877,29 +857,8 @@ uint64_t migrate_xbzrle_cache_size(void) return s->parameters.xbzrle_cache_size; } =20 -/* parameter setters */ - -void migrate_set_block_incremental(bool value) -{ - MigrationState *s =3D migrate_get_current(); - - s->parameters.block_incremental =3D value; -} - /* parameters helpers */ =20 -void block_cleanup_parameters(void) -{ - MigrationState *s =3D migrate_get_current(); - - if (s->must_remove_block_options) { - /* setting to false can never fail */ - migrate_cap_set(MIGRATION_CAPABILITY_BLOCK, false, &error_abort); - migrate_set_block_incremental(false); - s->must_remove_block_options =3D false; - } -} - AnnounceParameters *migrate_announce_params(void) { static AnnounceParameters ap; --=20 2.41.0