From nobody Tue Feb 10 12:39:50 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1686598449; cv=none; d=zohomail.com; s=zohoarc; b=d+hwuwZu43j7pD6tDboe7/dLtJEav2QYHxwHqq7tkG7mVZGnezLeW7qiZmV9BaLA3xJXy4xB0I/8Q8nH2tWzOA014IsOJIwftV6ODcvs0UuNBYOtHRj3lX2chVokWqUe7nCAHopLCX24rcQQv9C2hlpuXCSZq4jGDhBVny3/gYU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1686598449; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=TsG0ULPROPJHJvum3v/paBKuGm0ocJHoqJw2De/kGRc=; b=V5uKg2DsPc3lssAu9bQycTd/59Fq3A6TPYPs21JVwK91KuQefXe2sqRDCPv2mCHxSBjpAIsZ4M7HIRioEa+YsCQgNjGe4dwMpXJJe8OBsgzPRwdPis8Exw4vvvhIqigBeyzG9HTjhLHRM+tEYyLVHQ/nshXSSac8pdHlp6Ym0MQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1686598449322294.439004825584; Mon, 12 Jun 2023 12:34:09 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.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-537-OduVZWN3OgOersZewwdV5Q-1; Mon, 12 Jun 2023 15:34:05 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E95033C1C4CB; Mon, 12 Jun 2023 19:34:02 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id D5126C1604C; Mon, 12 Jun 2023 19:34:02 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id A358219465B6; Mon, 12 Jun 2023 19:34:02 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id CEEF3194658C for ; Mon, 12 Jun 2023 19:34:00 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id AFAAA1415137; Mon, 12 Jun 2023 19:34:00 +0000 (UTC) Received: from secure.mitica (unknown [10.39.192.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id F03E9141511A; Mon, 12 Jun 2023 19:33:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686598448; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=TsG0ULPROPJHJvum3v/paBKuGm0ocJHoqJw2De/kGRc=; b=XxELU/cltjOWfpIb2s2i9E08Op2quXRSBGaPLi5PYiH0pLOvDycM9ziIKkuGSPrk5wH2N/ vyjZOiHD0MFEEiN/dX4rat1nylp7+QVeP6g7YghgV9aevJbWg1ZQiBAaIg76bYldllZBzv f8pBvtwepGIH2oLyxGptcsGgHumGNoI= X-MC-Unique: OduVZWN3OgOersZewwdV5Q-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Juan Quintela To: qemu-devel@nongnu.org Subject: [RFC 5/6] migration: Deprecate block migration Date: Mon, 12 Jun 2023 21:33:43 +0200 Message-Id: <20230612193344.3796-6-quintela@redhat.com> In-Reply-To: <20230612193344.3796-1-quintela@redhat.com> References: <20230612193344.3796-1-quintela@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Kevin Wolf , Thomas Huth , qemu-block@nongnu.org, Juan Quintela , libvir-list@redhat.com, Markus Armbruster , Peter Xu , Hanna Czenczek , Leonardo Bras , Stefan Hajnoczi , Paolo Bonzini , Eric Blake Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1686598449937100001 Content-Type: text/plain; charset="utf-8"; x-default="true" It is obsolete. It is better to use driver_mirror+NBD instead. CC: Kevin Wolf CC: Eric Blake CC: Stefan Hajnoczi CC: Hanna Czenczek Signed-off-by: Juan Quintela --- Can any of you give one example of how to use driver_mirror+NBD for deprecated.rst? Thanks, Juan. --- docs/about/deprecated.rst | 6 ++++++ qapi/migration.json | 29 +++++++++++++++++++++++++---- migration/block.c | 2 ++ migration/options.c | 7 +++++++ 4 files changed, 40 insertions(+), 4 deletions(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index 518672722d..173c5ba5cb 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -454,3 +454,9 @@ Everything except ``-incoming defer`` are deprecated. = This allows to setup parameters before launching the proper migration with ``migrate-incoming uri``. =20 +block migration (since 8.1) +''''''''''''''''''''''''''' + +Block migration is too inflexible. It needs to migrate all block +devices or none. Use driver_mirror+NBD instead. + diff --git a/qapi/migration.json b/qapi/migration.json index b71e00737e..a8497de48d 100644 --- a/qapi/migration.json +++ b/qapi/migration.json @@ -258,11 +258,16 @@ # blocked. Present and non-empty when migration is blocked. # (since 6.0) # +# Features: +# +# @deprecated: @disk migration is deprecated. Use driver_mirror+NBD +# instead. +# # 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', @@ -497,6 +502,9 @@ # # Features: # +# @deprecated: @block migration is deprecated. Use driver_mirror+NBD +# instead. +# # @unstable: Members @x-colo and @x-ignore-shared are experimental. # # Since: 1.2 @@ -506,7 +514,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', @@ -789,6 +798,9 @@ # # Features: # +# @deprecated: Member @block-incremental is obsolete. Use +# driver_mirror+NBD instead. +# # @unstable: Member @x-checkpoint-delay is experimental. # # Since: 2.4 @@ -803,7 +815,7 @@ 'tls-creds', 'tls-hostname', 'tls-authz', 'max-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', @@ -945,6 +957,9 @@ # # Features: # +# @deprecated: Member @block-incremental is obsolete. Use +# driver_mirror+NBD instead. +# # @unstable: Member @x-checkpoint-delay is experimental. # # TODO: either fuse back into MigrationParameters, or make @@ -972,7 +987,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', @@ -1137,6 +1153,9 @@ # # Features: # +# @deprecated: Member @block-incremental is obsolete. Use +# driver_mirror+NBD instead. +# # @unstable: Member @x-checkpoint-delay is experimental. # # Since: 2.4 @@ -1161,6 +1180,8 @@ '*downtime-limit': 'uint64', '*x-checkpoint-delay': { 'type': 'uint32', 'features': [ 'unstable' ] }, + '*block-incremental': { 'type': 'bool', + 'features': [ 'deprecated' ] }, '*block-incremental': 'bool', '*multifd-channels': 'uint8', '*xbzrle-cache-size': 'size', diff --git a/migration/block.c b/migration/block.c index b9580a6c7e..2521a22269 100644 --- a/migration/block.c +++ b/migration/block.c @@ -722,6 +722,8 @@ 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 mirror jobs instead."= ); + qemu_mutex_lock_iothread(); ret =3D init_blk_migration(f); if (ret < 0) { diff --git a/migration/options.c b/migration/options.c index b62ab30cd5..374dc0767e 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" @@ -437,6 +438,10 @@ bool migrate_caps_check(bool *old_caps, bool *new_caps= , Error **errp) return false; } #endif + if (new_caps[MIGRATION_CAPABILITY_BLOCK]) { + warn_report("Block migration is deprecated. " + "Use driver_mirror+NBD instead."); + } =20 #ifndef CONFIG_REPLICATION if (new_caps[MIGRATION_CAPABILITY_X_COLO]) { @@ -1257,6 +1262,8 @@ static void migrate_params_apply(MigrateSetParameters= *params, Error **errp) } =20 if (params->has_block_incremental) { + warn_report("Block migration is deprecated. " + "Use driver_mirror+NBD instead."); s->parameters.block_incremental =3D params->block_incremental; } if (params->has_multifd_channels) { --=20 2.40.1