From patchwork Wed Nov 3 13:29:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Sementsov-Ogievskiy X-Patchwork-Id: 12600791 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 508ADC433F5 for ; Wed, 3 Nov 2021 13:32:51 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C3B4C61076 for ; Wed, 3 Nov 2021 13:32:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C3B4C61076 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=virtuozzo.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:49190 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1miGNl-0002Un-OG for qemu-devel@archiver.kernel.org; Wed, 03 Nov 2021 09:32:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35268) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1miGKo-0007VM-Tk; Wed, 03 Nov 2021 09:29:46 -0400 Received: from mail-db8eur05on2117.outbound.protection.outlook.com ([40.107.20.117]:3553 helo=EUR05-DB8-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1miGKl-00076y-O6; Wed, 03 Nov 2021 09:29:45 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XZYa4sG51PzUgYjScAb0cKOC3iNhNBal1HmS6CcKgwtuXvyAr4fpttdZw0r7H1BVhou057V0zrMRv0PgXj4ESxYyFrCW6s/yp85Se4Uovlt/gNH/hvpq+5M4PApPgZactBj+qhG632EFjmz+Eu35evXLoKYw6KJzei2yOL41/1osj6QqExv4kxCf4cu1cTS5E9k3Dqum3GxoKfM/t26ouyV7NtAFAQS66+5QWCCfKALmRRJjgTo8Fr0RVkSeyCQtucNvHGNukNnvlhjwyRxB0ASXGUJruwSg3UHwOY4Si+llF78dgYqGyfjZwHunK9tpV1M/ND5mDrLDn+f/Djiffw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Z9JeR1xN9cce6P/AsOfeQhAmRGK9j6gJWdokclE5hn4=; b=CwUIfYIJYpY4oZdh1E2M8gsEdAxA1gbloon9r8iX4sIyobBLbHMHhyCZuXl56yfUqgAUAFCd8CjBFZd3dZ4YYfhbSmOAOOXJrkr103ObLvaIfHOuCa1Q+D+e7ZmlFpb1Vu07JOx6K7zvwyBZYFOpHVL9wbEVnjMOPWNS3HfgEoQpKDBS/XNCW2RjBoc4SCPQvjiFhfg29baQjOSFNYGT9dHKDE7fwWZSADO67e2ubuVOgkU3M70XvjsNwobLB8lqYWWpIom/r9y31TGsKsmYEl9XwCFWiRi3pj+iZ0C8Ep6eg8OCm4qFYBUlwyJlX+AXoRzy7LYrLwECbMms8ljh3Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=virtuozzo.com; dmarc=pass action=none header.from=virtuozzo.com; dkim=pass header.d=virtuozzo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Z9JeR1xN9cce6P/AsOfeQhAmRGK9j6gJWdokclE5hn4=; b=Sj/sV9eY1eZakTrEECugnm1pIFkTRaPnwQtuHb+pQcTA/xND9TPoQDntrIgNEh/SqB4AfyBM+KD/5joCpPjn+6lMAInZRmjsbNG00q/YH3PLiLpGjQjLzlFHblsbSupH5/bBvjayyGy4ajxeUbDAOzLZuuWuBgCFIp4jTrJXJtE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=virtuozzo.com; Received: from AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) by AM6PR08MB5256.eurprd08.prod.outlook.com (2603:10a6:20b:e7::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.15; Wed, 3 Nov 2021 13:29:38 +0000 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::a994:9f7c:53a5:84bc]) by AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::a994:9f7c:53a5:84bc%5]) with mapi id 15.20.4649.020; Wed, 3 Nov 2021 13:29:38 +0000 From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, armbru@redhat.com, jsnow@redhat.com, vsementsov@virtuozzo.com, eblake@redhat.com, xiechanglong.d@gmail.com, wencongyang2@huawei.com, libvir-list@redhat.com, kchamart@redhat.com Subject: [PATCH v3 1/3] docs/block-replication: use blockdev-backup Date: Wed, 3 Nov 2021 14:29:10 +0100 Message-Id: <20211103132912.1977438-2-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211103132912.1977438-1-vsementsov@virtuozzo.com> References: <20211103132912.1977438-1-vsementsov@virtuozzo.com> X-ClientProxiedBy: AS9PR0301CA0015.eurprd03.prod.outlook.com (2603:10a6:20b:468::23) To AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) MIME-Version: 1.0 Received: from kvm.ch-qa.sw.ru (130.117.225.5) by AS9PR0301CA0015.eurprd03.prod.outlook.com (2603:10a6:20b:468::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.15 via Frontend Transport; Wed, 3 Nov 2021 13:29:37 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 01f0e1d8-7258-486f-6b47-08d99ecdfbdf X-MS-TrafficTypeDiagnostic: AM6PR08MB5256: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Hyy6cczWOOgVakbw4YYKFYOwUmJ7pkqAXWSR4xpm8lHnG/FwQQUq3qQakHhBhB0PsYc0DR86x0xtIU+86ZyBxfrxsx2kxnsxS9mvfXrFWNATxUQ/AZ7jGVioG1POWb/DHaY6jjSreJAKramNk40ozH/Es+NB9K4Lgo8Rs8zwc9gFF5hpX96IarUIGfq6BNMfEaqYjrU6MmAxw+AEKheqcWENsqZcfeR4eWx/yEMJyCt+UFOGzSGgHCprgqcArBvaM+QdoGjwH51QxnbUFXVCTPofX3C/ZHYd0TVyXhtWR3yeRdvLKmJjFVvuewYYQKelb2JR6KWFoGSoWJfxw3Q4Zu3jp29eaOhAPiHM8+u5V29q1Fl5r342Ur/QJN3FU1pPOUYIaKGpldwSFotQm2BgK35twFYaKmmr/EXaLv5aoBGx3Xvvw9DvSGZ7XN5LygE/wSan2Bb34wtiybqosOE3NNQcUW3vxcU1l2/LvAqOtDJAqPpXIbS/ww56HoTVBPju6d4WyUrPhat3vCzRCUj/qHXAyY0o/Y79UNh4hQogAm7G3yx+dE2/F0ZUYqSiH7qYz3Op/1wj+bF5VtmHqoGcd25cEtnApHxlepButqWwWuBIjyQ/WRexWzNYF4GGLM8jXKWGqJZ8NL/VJliolPx68CsxT4CZ5Bv1AA1a22bNyiYbhVHFp8wX/suT3e1YaYahK4OPHM/jEKJYwLyP6gBlKA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR08MB5494.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(1076003)(8676002)(52116002)(6486002)(6506007)(508600001)(6666004)(186003)(8936002)(2906002)(83380400001)(956004)(2616005)(36756003)(66946007)(5660300002)(38100700002)(66476007)(86362001)(6916009)(38350700002)(4326008)(6512007)(66556008)(316002)(26005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: GbwJgDaWz2qhHSUKds9fUzgZtmpjhpnRRZLEWhGt3WupNkGaIifa15eELZriPggJE6brAPYkbkkSL8pbas965U5wKfEP7xXvae+42QZDUbuQyDw/3X9u8wZajTzqwKay3lR0v5gJJaPNwanU7msZsZnWvtg2971qbilj1FOGF5MK2TW122O98IbuFgIqQicIJnymc3U6zCK0cW3GnoOenh/C2ECryIEHQMEDsvXqWdIT/AfRycztKyJUzIjy+EEd1TlPHWF7ylE2smrlTVZ1tTqm+Az1l0DPEIN95swZMwDKqZOSzNKeo2jpjj5ceamCfD/1fARj+i+qJuJebBD4kRpcgy/AXwniHvlyI1rHILZEHGnAIqHUHEmkF5hlW73wFl8dvSkB8K3t1UXVRbSiskzgCfSUsxt2DAIZbM1HvYoDMNRiQPKJ5cybejuDQsqR66cZs0Br4va/pz4aOUdsX0b51cEDkP2SafqIWfaiXvzuUmnL/0sXsiCL6Pk/X5kb5dYhIJGzv0qgcjj6muVxf2Quo6MhjW0WN0NTStcCViDWZ+MALMnuCSnw21byVzedplO3D3FLTLKZg3MYqCITd6rYBi0Nj+nbpjkFw7Ty2QOceljbLTMtSgi3psNySdNaH/zD6pTdKgj5RlbyN7uX6X3uadvnYProtqAJG/YLsECNG2nGbVJrccgEJunsgWxKEK4opypiP397XaGoCZ4r6cBRgVA627MvLpiMIoTAZc7BFm6RFOyQAUr/EhDoTP6mfPq1i8Bbn8gHqLBds1W/CZYr2YoaEJO5DBkVl5qzdqLGDxQGOmbSgRs1PXCeJs9/+5lG2HR/NZPi1Qnj6BiOJCBTlULpc/cxsrXNJ+z6nlqTnh+Jc9hK7KKBxi7e8NYNCwNC5cI34l88IGomuvmGYxedauu9RfozIkIcsIiWQ1fwFDKbQ2twwPeq7nEx9xdjUO+nvH7Skr6nJ/nKDWdXe4YlY7zv3LyFXmymwkjVn9o6RZV/25qE1y88rZl0auR1fwwOzlF9byAfc/vJbhc9tqRIKeRddKe2dE0eGwS4eITmSeJHb10UeJaX093JVKQ30oTQ46A72BS497jdbnANGqqIH4anOQ5YYIc5CEi6HZI7EyEHxwMucQG9mk3Bf8yD+WOMUXOhQVlcPl4jZprNfyKHEdKCAT9NKUesWWGzR0OktgwVBLwXq455A1C33wup1AMs4fWOgVF0X6PssW2BwbWExWmA1BvmTMmKsKJFuI41hUriSDlBTuGLac0whJOHsSzuWzpx0SkZSflGgSLadF4Z7d63VUo6IlZG6FXqi7RuijwX7OJYv/crj1wRfLVqnge2HOPWjzITC5LCcDsAPs9JF8G/0+lDBADkTfmcfgJS1QrzW6BKqgr1c2Q+/nDF9LqXwUVXPgYoWu/N+36UdW7CBX8SGZS0sod23cVcthMGFylrLyIxGCtEggWzRJMsoIqXXqE9hK5vCk+2z6IOQvPeSCuALSVUSd2j0S0aiEnbHswxT65NA43FpkvaQU2nnewjbBisV1xZNweZoyAL7TPasxz8Um5h5yiQKFkXQMoa9fACac42FeBz1RBc0L4aSpbM5PVKFfoAlRDJ+KT4pmFDCKAGfGiiztFXHqUk3iFDGnPYuI1EtUdLwVJaa3vGc8oskPPB/fuAJq1rGNX1ug== X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 01f0e1d8-7258-486f-6b47-08d99ecdfbdf X-MS-Exchange-CrossTenant-AuthSource: AM7PR08MB5494.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Nov 2021 13:29:38.1938 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: uagPa2C7qH1wSAYv7tLyMVbsJtIZXVT1JF8jPdFQstK6xv3WLCPk0ZuRhCdDIfMXUS8XSeU9YU5PlYiNEA6d8GDmL9qHKjqLQPCFQJRr4vY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB5256 Received-SPF: pass client-ip=40.107.20.117; envelope-from=vsementsov@virtuozzo.com; helo=EUR05-DB8-obe.outbound.protection.outlook.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-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+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" We are going to deprecate drive-backup, so don't mention it here. Moreover, blockdev-backup seems more correct in the context. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow --- docs/block-replication.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/block-replication.txt b/docs/block-replication.txt index 108e9166a8..59eb2b33b3 100644 --- a/docs/block-replication.txt +++ b/docs/block-replication.txt @@ -79,7 +79,7 @@ Primary | || Secondary disk <--------- hidden-disk 5 <--------- || | | || | | || '-------------------------' - || drive-backup sync=none 6 + || blockdev-backup sync=none 6 1) The disk on the primary is represented by a block device with two children, providing replication between a primary disk and the host that @@ -101,7 +101,7 @@ should support bdrv_make_empty() and backing file. that is modified by the primary VM. It should also start as an empty disk, and the driver supports bdrv_make_empty() and backing file. -6) The drive-backup job (sync=none) is run to allow hidden-disk to buffer +6) The blockdev-backup job (sync=none) is run to allow hidden-disk to buffer any state that would otherwise be lost by the speculative write-through of the NBD server into the secondary disk. So before block replication, the primary disk and secondary disk should contain the same data. From patchwork Wed Nov 3 13:29:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Sementsov-Ogievskiy X-Patchwork-Id: 12600805 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1E690C433EF for ; Wed, 3 Nov 2021 13:33:50 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 89FC7610FC for ; Wed, 3 Nov 2021 13:33:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 89FC7610FC Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=virtuozzo.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:52136 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1miGOi-0004Sa-Mn for qemu-devel@archiver.kernel.org; Wed, 03 Nov 2021 09:33:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35424) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1miGL5-0007o4-KY; Wed, 03 Nov 2021 09:30:03 -0400 Received: from mail-db8eur05on2117.outbound.protection.outlook.com ([40.107.20.117]:3553 helo=EUR05-DB8-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1miGKy-00076y-8P; Wed, 03 Nov 2021 09:30:03 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Xau83nAj1r1E8DakNZMdOpgCgDlHfG9M2oa3c+gnIA7h5AWCUQATlywOrsIBqcQOt1oQGyooiRYSiRc9hIvpFwzAswFvctLo6GhYP8Zhx082FtG36i5H0M1Z0g83b7zGZkInAUdXVlc9bwwdTFr0pLrSY9fSSWgcRizlzzM7O/ijedxKg5Zq2SUlwR9Oo9zHFjNcLuC/MCdxla/wNb+Qc9e+ylBp78ZN4YlxJ+/r9UxgOECjTPRJlh1ooUau0kmWgjR1fOaxbhV9uDNjw6ayu9K73iYGKfzjMrJjRt3W8Rtj5sodIRx86nfV3m0agWyfwn8B8H3jHFs3MgCtp7wk1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=fjhADTVAUoDLhCzfU++FG7KITNukarM7S6d27exKUFw=; b=hEEf3fdsB2S6wiCQDv80LG1WKWEYgO2Qg/DUA//nDoU1iIvCm0oOifXKA6Lw3X4HhUiWOXdAcfwIqVci6dcPR6vUYnCvBbN3W5AYJwAVJaK4J/onIz5XJ3/ZX/A09J2C/LjrRtXJ72oo/e6lMti9vVMkRRH/F3BT8mJ8cDKfbBK+jNHjxli+AQWhmik4LXADRAb0K5IHFkw2GVpinQNZrhMFQpswMsx+D489/GCL8vDspCWtEKy0tyjkMXWWp0+0OJw9bB2focNrf0G7dzSa+ZSLyJZT/fw2kCiLkN5oRchFkyArEfxJ3dI5hb2jOa2px5pITdoocoml0nZ6S1WYww== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=virtuozzo.com; dmarc=pass action=none header.from=virtuozzo.com; dkim=pass header.d=virtuozzo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fjhADTVAUoDLhCzfU++FG7KITNukarM7S6d27exKUFw=; b=IezYTmRuv6KVGr6xnt2HDXX3+Snf0M3ZWpKuQLeuUAvj2lxhgA0MQ/T0KbO3KI483eFOoOfKixhGQo8iPlcPsetkT46/Bg4KpyQeb+PR5nGHq7acgEogzbh0mXtDcyHpnSbyQMapfpMiCwhJCFEFSksj15sKnjYmvhlI7ZicwUw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=virtuozzo.com; Received: from AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) by AM6PR08MB5256.eurprd08.prod.outlook.com (2603:10a6:20b:e7::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.15; Wed, 3 Nov 2021 13:29:39 +0000 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::a994:9f7c:53a5:84bc]) by AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::a994:9f7c:53a5:84bc%5]) with mapi id 15.20.4649.020; Wed, 3 Nov 2021 13:29:39 +0000 From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, armbru@redhat.com, jsnow@redhat.com, vsementsov@virtuozzo.com, eblake@redhat.com, xiechanglong.d@gmail.com, wencongyang2@huawei.com, libvir-list@redhat.com, kchamart@redhat.com Subject: [PATCH v3 2/3] docs/interop/bitmaps: use blockdev-backup Date: Wed, 3 Nov 2021 14:29:11 +0100 Message-Id: <20211103132912.1977438-3-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211103132912.1977438-1-vsementsov@virtuozzo.com> References: <20211103132912.1977438-1-vsementsov@virtuozzo.com> X-ClientProxiedBy: AS9PR0301CA0015.eurprd03.prod.outlook.com (2603:10a6:20b:468::23) To AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) MIME-Version: 1.0 Received: from kvm.ch-qa.sw.ru (130.117.225.5) by AS9PR0301CA0015.eurprd03.prod.outlook.com (2603:10a6:20b:468::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.15 via Frontend Transport; Wed, 3 Nov 2021 13:29:38 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a633a7af-d5eb-4ac4-ab7d-08d99ecdfc26 X-MS-TrafficTypeDiagnostic: AM6PR08MB5256: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TCSmOjcudkrAjH8WXQiVQmYdyCvaT1fCy/Eg9lSyXwzKOpz/O2t/iSRnR02mrTZZi9GiI9bejaAUTba7yF2NlE5hubIe9axyzcYbLHWZ+7pZI/JymPghZ1HkG6z+JwPtWbcPMZJTw0d+82QSsXVVBf80cZiy6Rkfr+F0laNudoySwaD68hGsukcFyI42iG9OQnkv3OqNzWwtSBI/aubfccv9zsBP2BhKYjFD0xrhz7bd7aXLzPIkNucvE6zYx9l9eUcv9zBpB3XnOXgBnCIVCtxO8qVL+T6Mo6ex4S1AAYO/36+J36PJ9CJ4weudE1p1kX5duDwS2I7GxlkPj97t77jpDE3VGtFzHlW46r/GwC0PjGgLVLS2WN+MUNnROqhdtCAniNpR8kYq5YnyU39AAmRVQIhIrM7iuN26Q+SPv1AKRhGNUWLBhDpEwe+2h4c3OAfFGpTsNoxO6qwskfU0eXzqxCCzWLdxcqD/hYWgNc4EjIx05lxbuDfE0Ui6OpFDRbRXO8wVsuwBmURV0r76GqWxUhca4me+ofRQ0F4+XEflNS0byDNh0PVZCvnmZY+Mw5hKjuhPtQi3s9g/ncrg4k5TicvjafDoAeM8k6sFIOg4GIKFvOr8/cKwzVT33IGnScZeBMetJarsT1fhIa9FpAHK/cJXtK97tvSeOKshANw0GlV4Y4W2ovN0JUTf0R0VopldzfgECBX/1uJPQQ4WLw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR08MB5494.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(1076003)(8676002)(52116002)(6486002)(6506007)(508600001)(6666004)(186003)(8936002)(2906002)(83380400001)(956004)(2616005)(36756003)(66946007)(5660300002)(38100700002)(66476007)(86362001)(6916009)(38350700002)(4326008)(6512007)(66556008)(316002)(30864003)(26005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: OdT4tFeRujS4JYK0YqXvQvJFv7ZVbhNgIAgH/Id4iJDw9xec6vwpQDCuVE1sDZjyRcsN09Lze3e3gC7icTR2B5I42+zYoo8n2EsJz5YIYmgh4EuRolzzACS5+LTvv1MNS2zw7h+AC0rJ09BSnyYDA2HuKXo+WK6XXiKO5Ctyv86KjLqyc/acjBZ/MJs+jUvzhEtZFiG+aoJ8G4+XksBksxdCmtXTpQ9Z72zyyxTaB9O5mQq+1a2JmM1iVVlYJIDyLdUiDM2/Z0+5hMY+YuP3zSyibeHx7ZUhcQ0REl+s2dsWjaTNEnoa4jfW1nPgWw8PrBvgAYyj94mwLYsN5nOnUqIDSTwSIedRSBsYSxkMbGXRwiAZeGhSUknfDxMPP5xtY5TrWL9+N3yTJ8/5jzG+JXcZdQThpAW8NMIag+BJF1XG0Iwqg0efddMNaDrn0aywFXg7P44tjQd3IS4ON3wh185MlwEdLdD0qnqdcl8Vbp+K9DGnTWNBgMUp0Q8YoPIitvkfvCdzGgBNzCPva4jPCjeulGZKk7h5rw9dYqCJExmTEW+zJFbkF23ibiV/kXgHAlK+9yP2lnhrxrdRVSv1Wj1PXW0b1griQc2xLgLAbGOBwEDZ7V2cGp9EOE9YrCbHfWevxrirgnGZp2VBefKeKN3A4qE+qox0WsB3P1FwYOp2/Xbrl7GjHYWCLI94WAgoJHGl+4BhW6Yc6/HW7NzEqeYWGvoL0oR+MNyv5WT6W8EN2SHmOVFwmwKoxK05q7iu57+YsMiawc/8u9I83dhU0+ZQKzXCF6JX6JmMQQpFTR9tvxPvd0ZlNSJURIP6lDBEQ7okJ9fEqEqNI5vuUOB6aqD8eGlcgGgV6hXik5KluszzA2dAj4TCCCpvVc7E0n0TwTmMc1OdwSLMovxCphPJD3rKffeezyhGxafTu2TOS3SMhZ6sObrX1vKyokpEH0C9CKZVbKyX9AKLp3FFPm1Oedf3VcDEAMIdvROQTy2VK3jiSZnKctuFLyeqQPAcx24My4t7sANHYrwbOnrNHsFvgaby3NJrtvJ/BJ1AM8fssAULQGtfMVHPS/RKb0CNZxFzPbRsmcZnMx2/+SRe9p4nPyYnQzS3y9LdDi4wsE68+Yfamf+bT7IowOS/Pnm5F2K/C2zwzKPNC1sPZKPngJeMO/gqw7EMaosOCncet+g+CfACC5cP7aEVSdAXwJzOEvgHRqoadOKxXbSklkmYNLSkA/nhWKuCMSHT8xln7uSwGynQ/U5S/tlWqn72J7IBpX001RO3QnLh9DvRVJssGT+6ozVkzs+VerqU3OGaQi36XNDrYOpHAn60Sofy5rXBLr2O8xHNhyuoA1IjK6U6Hy0clLzMTwoDkms1Z4pRlViQfuI/Ltq33UiuXpBR8DryKZ0+OxnAlhBsN2EA8qEyVXM6uXKBKWO816FszQGqcv82MKZ3jL+UcheQF7T1ZR+bIV3sxl3bIXsK5It2QfyHtjFkxnh+saZN4SWHF79Hyioo6DbZf+QhGd98J3L+dOsJ8T9FVn/UVq8bRKLLlHYNoMbIg4Q84jjt0YGGQZc2qSdvp2EGGE/Xf6I2GvBYBj3UlFx6UwXtZeC9aCDwpFcpsNGdvD4V2OZVjRGvqujJnXOrfi/ZXBmjWoJ4vAKf3a8ji2LmSFvRHbxxTrjZe44yFbZs5w== X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: a633a7af-d5eb-4ac4-ab7d-08d99ecdfc26 X-MS-Exchange-CrossTenant-AuthSource: AM7PR08MB5494.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Nov 2021 13:29:38.6846 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 9DPnVGd+cL0m2fSSnB3nRs9fPspfRn90Q9mG052X0acBMfBjiGUm4tc2SteNd1EmQp6J6O62NrmF50U+ti7+cxoMD472UhbepN3aAAVH2I0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB5256 Received-SPF: pass client-ip=40.107.20.117; envelope-from=vsementsov@virtuozzo.com; helo=EUR05-DB8-obe.outbound.protection.outlook.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-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+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" We are going to deprecate drive-backup, so use modern interface here. In examples where target image creation is shown, show blockdev-add as well. If target creation omitted, omit blockdev-add as well. Reviewed-by: Kashyap Chamarthy Signed-off-by: Vladimir Sementsov-Ogievskiy --- docs/interop/bitmaps.rst | 285 +++++++++++++++++++++++++++++---------- 1 file changed, 215 insertions(+), 70 deletions(-) diff --git a/docs/interop/bitmaps.rst b/docs/interop/bitmaps.rst index 059ad67929..1de46febdc 100644 --- a/docs/interop/bitmaps.rst +++ b/docs/interop/bitmaps.rst @@ -539,12 +539,11 @@ other partial disk images on top of a base image to reconstruct a full backup from the point in time at which the incremental backup was issued. The "Push Model" here references the fact that QEMU is "pushing" the modified -blocks out to a destination. We will be using the `drive-backup -`_ and `blockdev-backup -`_ QMP commands to create both +blocks out to a destination. We will be using the `blockdev-backup +`_ QMP command to create both full and incremental backups. -Both of these commands are jobs, which have their own QMP API for querying and +The command is a background job, which has its own QMP API for querying and management documented in `Background jobs `_. @@ -557,6 +556,10 @@ create a new incremental backup chain attached to a drive. This example creates a new, full backup of "drive0" and accompanies it with a new, empty bitmap that records writes from this point in time forward. +The target can be created with the help of `blockdev-add +`_ or `blockdev-create +`_ command. + .. note:: Any new writes that happen after this command is issued, even while the backup job runs, will be written locally and not to the backup destination. These writes will be recorded in the bitmap @@ -576,12 +579,11 @@ new, empty bitmap that records writes from this point in time forward. } }, { - "type": "drive-backup", + "type": "blockdev-backup", "data": { "device": "drive0", - "target": "/path/to/drive0.full.qcow2", - "sync": "full", - "format": "qcow2" + "target": "target0", + "sync": "full" } } ] @@ -664,12 +666,11 @@ use a transaction to reset the bitmap while making a new full backup: } }, { - "type": "drive-backup", + "type": "blockdev-backup", "data": { "device": "drive0", - "target": "/path/to/drive0.new_full.qcow2", - "sync": "full", - "format": "qcow2" + "target": "target0", + "sync": "full" } } ] @@ -728,19 +729,35 @@ Example: First Incremental Backup $ qemu-img create -f qcow2 drive0.inc0.qcow2 \ -b drive0.full.qcow2 -F qcow2 +#. Add target block node: + + .. code-block:: QMP + + -> { + "execute": "blockdev-add", + "arguments": { + "node-name": "target0", + "driver": "qcow2", + "file": { + "driver": "file", + "filename": "drive0.inc0.qcow2" + } + } + } + + <- { "return": {} } + #. Issue an incremental backup command: .. code-block:: QMP -> { - "execute": "drive-backup", + "execute": "blockdev-backup", "arguments": { "device": "drive0", "bitmap": "bitmap0", - "target": "drive0.inc0.qcow2", - "format": "qcow2", - "sync": "incremental", - "mode": "existing" + "target": "target0", + "sync": "incremental" } } @@ -785,20 +802,36 @@ Example: Second Incremental Backup $ qemu-img create -f qcow2 drive0.inc1.qcow2 \ -b drive0.inc0.qcow2 -F qcow2 +#. Add target block node: + + .. code-block:: QMP + + -> { + "execute": "blockdev-add", + "arguments": { + "node-name": "target0", + "driver": "qcow2", + "file": { + "driver": "file", + "filename": "drive0.inc1.qcow2" + } + } + } + + <- { "return": {} } + #. Issue a new incremental backup command. The only difference here is that we have changed the target image below. .. code-block:: QMP -> { - "execute": "drive-backup", + "execute": "blockdev-backup", "arguments": { "device": "drive0", "bitmap": "bitmap0", - "target": "drive0.inc1.qcow2", - "format": "qcow2", - "sync": "incremental", - "mode": "existing" + "target": "target0", + "sync": "incremental" } } @@ -866,20 +899,36 @@ image: file for you, but you lose control over format options like compatibility and preallocation presets. +#. Add target block node: + + .. code-block:: QMP + + -> { + "execute": "blockdev-add", + "arguments": { + "node-name": "target0", + "driver": "qcow2", + "file": { + "driver": "file", + "filename": "drive0.inc2.qcow2" + } + } + } + + <- { "return": {} } + #. Issue a new incremental backup command. Apart from the new destination image, there is no difference from the last two examples. .. code-block:: QMP -> { - "execute": "drive-backup", + "execute": "blockdev-backup", "arguments": { "device": "drive0", "bitmap": "bitmap0", - "target": "drive0.inc2.qcow2", - "format": "qcow2", - "sync": "incremental", - "mode": "existing" + "target": "target0", + "sync": "incremental" } } @@ -930,6 +979,38 @@ point in time. $ qemu-img create -f qcow2 drive0.full.qcow2 64G $ qemu-img create -f qcow2 drive1.full.qcow2 64G +#. Add target block nodes: + + .. code-block:: QMP + + -> { + "execute": "blockdev-add", + "arguments": { + "node-name": "target0", + "driver": "qcow2", + "file": { + "driver": "file", + "filename": "drive0.full.qcow2" + } + } + } + + <- { "return": {} } + + -> { + "execute": "blockdev-add", + "arguments": { + "node-name": "target1", + "driver": "qcow2", + "file": { + "driver": "file", + "filename": "drive1.full.qcow2" + } + } + } + + <- { "return": {} } + #. Create a full (anchor) backup for each drive, with accompanying bitmaps: .. code-block:: QMP @@ -953,21 +1034,19 @@ point in time. } }, { - "type": "drive-backup", + "type": "blockdev-backup", "data": { "device": "drive0", - "target": "/path/to/drive0.full.qcow2", - "sync": "full", - "format": "qcow2" + "target": "target0", + "sync": "full" } }, { - "type": "drive-backup", + "type": "blockdev-backup", "data": { "device": "drive1", - "target": "/path/to/drive1.full.qcow2", - "sync": "full", - "format": "qcow2" + "target": "target1", + "sync": "full" } } ] @@ -1016,6 +1095,38 @@ point in time. $ qemu-img create -f qcow2 drive1.inc0.qcow2 \ -b drive1.full.qcow2 -F qcow2 +#. Add target block nodes: + + .. code-block:: QMP + + -> { + "execute": "blockdev-add", + "arguments": { + "node-name": "target0", + "driver": "qcow2", + "file": { + "driver": "file", + "filename": "drive0.inc0.qcow2" + } + } + } + + <- { "return": {} } + + -> { + "execute": "blockdev-add", + "arguments": { + "node-name": "target1", + "driver": "qcow2", + "file": { + "driver": "file", + "filename": "drive1.inc0.qcow2" + } + } + } + + <- { "return": {} } + #. Issue a multi-drive incremental push backup transaction: .. code-block:: QMP @@ -1025,25 +1136,21 @@ point in time. "arguments": { "actions": [ { - "type": "drive-backup", + "type": "blockev-backup", "data": { "device": "drive0", "bitmap": "bitmap0", - "format": "qcow2", - "mode": "existing", "sync": "incremental", - "target": "drive0.inc0.qcow2" + "target": "target0" } }, { - "type": "drive-backup", + "type": "blockdev-backup", "data": { "device": "drive1", "bitmap": "bitmap0", - "format": "qcow2", - "mode": "existing", "sync": "incremental", - "target": "drive1.inc0.qcow2" + "target": "target1" } }, ] @@ -1119,19 +1226,35 @@ described above. This example demonstrates the single-job failure case: $ qemu-img create -f qcow2 drive0.inc0.qcow2 \ -b drive0.full.qcow2 -F qcow2 +#. Add target block node: + + .. code-block:: QMP + + -> { + "execute": "blockdev-add", + "arguments": { + "node-name": "target0", + "driver": "qcow2", + "file": { + "driver": "file", + "filename": "drive0.inc0.qcow2" + } + } + } + + <- { "return": {} } + #. Attempt to create an incremental backup via QMP: .. code-block:: QMP -> { - "execute": "drive-backup", + "execute": "blockdev-backup", "arguments": { "device": "drive0", "bitmap": "bitmap0", - "target": "drive0.inc0.qcow2", - "format": "qcow2", - "sync": "incremental", - "mode": "existing" + "target": "target0", + "sync": "incremental" } } @@ -1164,6 +1287,19 @@ described above. This example demonstrates the single-job failure case: "event": "BLOCK_JOB_COMPLETED" } +#. Remove target node: + + .. code-block:: QMP + + -> { + "execute": "blockdev-del", + "arguments": { + "node-name": "target0", + } + } + + <- { "return": {} } + #. Delete the failed image, and re-create it. .. code:: bash @@ -1172,20 +1308,36 @@ described above. This example demonstrates the single-job failure case: $ qemu-img create -f qcow2 drive0.inc0.qcow2 \ -b drive0.full.qcow2 -F qcow2 +#. Add target block node: + + .. code-block:: QMP + + -> { + "execute": "blockdev-add", + "arguments": { + "node-name": "target0", + "driver": "qcow2", + "file": { + "driver": "file", + "filename": "drive0.inc0.qcow2" + } + } + } + + <- { "return": {} } + #. Retry the command after fixing the underlying problem, such as freeing up space on the backup volume: .. code-block:: QMP -> { - "execute": "drive-backup", + "execute": "blockdev-backup", "arguments": { "device": "drive0", "bitmap": "bitmap0", - "target": "drive0.inc0.qcow2", - "format": "qcow2", - "sync": "incremental", - "mode": "existing" + "target": "target0", + "sync": "incremental" } } @@ -1210,7 +1362,8 @@ described above. This example demonstrates the single-job failure case: Example: Partial Transactional Failures ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -QMP commands like `drive-backup `_ +QMP commands like `blockdev-backup +`_ conceptually only start a job, and so transactions containing these commands may succeed even if the job it created later fails. This might have surprising interactions with notions of how a "transaction" ought to behave. @@ -1240,25 +1393,21 @@ and one succeeds: "arguments": { "actions": [ { - "type": "drive-backup", + "type": "blockdev-backup", "data": { "device": "drive0", "bitmap": "bitmap0", - "format": "qcow2", - "mode": "existing", "sync": "incremental", - "target": "drive0.inc0.qcow2" + "target": "target0" } }, { - "type": "drive-backup", + "type": "blockdev-backup", "data": { "device": "drive1", "bitmap": "bitmap0", - "format": "qcow2", - "mode": "existing", "sync": "incremental", - "target": "drive1.inc0.qcow2" + "target": "target1" } }] } @@ -1375,25 +1524,21 @@ applied: }, "actions": [ { - "type": "drive-backup", + "type": "blockdev-backup", "data": { "device": "drive0", "bitmap": "bitmap0", - "format": "qcow2", - "mode": "existing", "sync": "incremental", - "target": "drive0.inc0.qcow2" + "target": "target0" } }, { - "type": "drive-backup", + "type": "blockdev-backup", "data": { "device": "drive1", "bitmap": "bitmap0", - "format": "qcow2", - "mode": "existing", "sync": "incremental", - "target": "drive1.inc0.qcow2" + "target": "target1" } }] } From patchwork Wed Nov 3 13:29:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Sementsov-Ogievskiy X-Patchwork-Id: 12600795 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E1588C433FE for ; Wed, 3 Nov 2021 13:32:51 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5DF90610FD for ; Wed, 3 Nov 2021 13:32:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5DF90610FD Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=virtuozzo.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:49356 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1miGNm-0002cS-Gp for qemu-devel@archiver.kernel.org; Wed, 03 Nov 2021 09:32:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35376) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1miGKx-0007XU-4u; Wed, 03 Nov 2021 09:29:55 -0400 Received: from mail-db8eur05on2117.outbound.protection.outlook.com ([40.107.20.117]:3553 helo=EUR05-DB8-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1miGKt-00076y-U5; Wed, 03 Nov 2021 09:29:54 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Hq/StTIc8WSRe53VUZaDZMVrXUOuzT2VVpv9o1HT9wcxZygwlEQx379trmYUwwBoxakoZw2X6NJ/noEYo+Zhy4fSjYhcJF4tVcaK38GFAIG7RMioMVnhXL+P4WuukSGySOczt9tzuk6RHPMBwIlZdKrjWHd+I1IhwX+HDD089yKUiZKgtejljOsFcdycrKgFbog6RQmUV4rF+/gRWQumx6tX/M/rFEm0kA9eqX7vfOY9eXg4+P6PXO0mJ5kJCIp+qpobMDZO2H+lCpGQqp7L6n75sSYaJ9tgbTYiEchcewib5FNo32wT7fvSghSwNNHnLDgms5Pn5RZdHEKlSO3sKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Cx8hTNe3tu88i/c7gA/eULZBQw44rNtDIR++HajU5h0=; b=NT6E+VBpigGqyF1bG9mHd0qy4Md+j+RzcP2gmWG8vY1yjeGKh4e/DMmqTT+PPWvXptSPFoK/O02iBLTtdiHwfoNP/b9lYQgCamIgACtdF/XqY1mEmX/h0PqNpWyJ+RRaOStt2eAfSVKJmiGDgBtLnNI5USKUMy5WbEWHRoEgZFa3F0XrCZxRJd5UV1QQ+MxqtD43wyUXeF7sDsVia7NWd4g1w0LhEsn5T1tg1jZJT5sm7cex13Oy/VLianiu1SJyVnHvuzZg0+G8L2cczhQaPj/+TuOXb24Z9K6bo+HtkjSmxY1iMvvchhpSaRAF5ezvXjru9MCY+gGxhH1mezuMeQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=virtuozzo.com; dmarc=pass action=none header.from=virtuozzo.com; dkim=pass header.d=virtuozzo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Cx8hTNe3tu88i/c7gA/eULZBQw44rNtDIR++HajU5h0=; b=UM/1R+E8KLv58fFSplmNsC28CjgEgKcB44VzU7eDNgGrVKB3EqH1+H5x40QDWRnNxSn8MHNxm8Ci59QdERH3UUiOK3x+RZzsDcS+vp6FzzryWkI9SIpUmKO8kq540cyA43mSgmudoWqAOiCUUu/FbRMttq2Ko1mDAHiEVMpnPyI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=virtuozzo.com; Received: from AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) by AM6PR08MB5256.eurprd08.prod.outlook.com (2603:10a6:20b:e7::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.15; Wed, 3 Nov 2021 13:29:39 +0000 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::a994:9f7c:53a5:84bc]) by AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::a994:9f7c:53a5:84bc%5]) with mapi id 15.20.4649.020; Wed, 3 Nov 2021 13:29:39 +0000 From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, armbru@redhat.com, jsnow@redhat.com, vsementsov@virtuozzo.com, eblake@redhat.com, xiechanglong.d@gmail.com, wencongyang2@huawei.com, libvir-list@redhat.com, kchamart@redhat.com Subject: [PATCH v3 3/3] qapi: deprecate drive-backup Date: Wed, 3 Nov 2021 14:29:12 +0100 Message-Id: <20211103132912.1977438-4-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211103132912.1977438-1-vsementsov@virtuozzo.com> References: <20211103132912.1977438-1-vsementsov@virtuozzo.com> X-ClientProxiedBy: AS9PR0301CA0015.eurprd03.prod.outlook.com (2603:10a6:20b:468::23) To AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) MIME-Version: 1.0 Received: from kvm.ch-qa.sw.ru (130.117.225.5) by AS9PR0301CA0015.eurprd03.prod.outlook.com (2603:10a6:20b:468::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.15 via Frontend Transport; Wed, 3 Nov 2021 13:29:38 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 02671726-5ee7-4439-70b5-08d99ecdfc6f X-MS-TrafficTypeDiagnostic: AM6PR08MB5256: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cf0nWX55ELPOufYb8A9Pg4zNb09zinsy6qLV3/J+Ivj1TMVN9SYAZUGMuwh6RIwvINcAxyV4I7MJDxxkbOujaEvAml4NiPGs5Ubinyzk0ROhtf4FgccjysrEl3/7Zw4pqQtUqA94jWdEtoGCwSvoZvMUcg2xbLcY/5tFCQk1ZHxTjLxmd+7qcnW4RYf+cqMVUyc0GPjyruCtDjmCt4eP414tiqM1SAg07AclY1KMEJGTUM+EnIRPwhxjNbrxwDCk5jM4Qr0oSQvtAd2tEYrdkPFAAkZzkOUuA9yPExqfQqXuRlnaSNxHeuRSkfCGb/4El1EW4bVNllK82Ldaro+Zn3HXlZgMYPvJq3d8qGkxccsSowd6U66+LBBSwIKkyLdC4Uwix6ljwyXXtLjfIOPK+7+Tn2CBbaIAQpOLUotED+nO/o950xE3nwig4Loi7tI7WahVo1BhYZniUiOVxBgDDD6b8YN6Fmmhc4AQGJeXXdPx8MCDwyFPAA5PtLYxTg2XIJ2FuIssmKfPVORybOaW9MQ3B1hfQLqX5BS7NrX83yy9UNEy3y7Zr725t7XWGfrYz9O+cTRipb41lA/4WbaSGbaep4AG19uRq+fEL5JF84/2lEhsJL8pMFJXMTGs01lTVgdVgJWYIU+4XdaQA1B/F+nZWv326W6HeHr1MZdwybkXSdnQYglAzf/QvHfwlAVRUAJS9qYxUKmEQpGZNcmSWg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR08MB5494.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(1076003)(8676002)(52116002)(6486002)(6506007)(508600001)(6666004)(186003)(8936002)(2906002)(83380400001)(956004)(2616005)(36756003)(66946007)(5660300002)(38100700002)(66476007)(86362001)(6916009)(38350700002)(4326008)(6512007)(66556008)(316002)(26005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: yRNwGu3uHUkdWIuTT9Vkd2VkrBoZ/9+zPko0RjQ0sCp2JI0juVN38MFMEv4+FWof2Whp9NtxCR7WcvyZm1W1HVeyUrwbk0zM08oNKIxw8eV3/tSjgcqYaxtDJb07bB3TzcqQtuwNq4XsTuSL2wtkmV0TyLp+s46wG5QJGm+P888KWFnPqSwJlr8x6nMUih8ERL+Gav5EeK6SzH+LKyzWxFkCljg5+YzVNItPUaOGrUAkJulp93T+kmTvJDE7tS/VU4PYaPjpIOFk+qj8Ybk5awC62cC+/L2ad5rRXGDLm4Gt6vG6rIWxk8K4RcnVmCIzq+4C/dCLtsZWm2I8DmrWWnqA63KvQdKZnnS+n1JEGybViev+h0dHPp5KiN9LHu4sIaYiJAafVIeCG0Ol3dZDGnxZHWpHQ4a4oHm+3DKI1e1SS/r1XckhtminP7p+Q03BkOv2Bq7/DRsGoL8WGHCOiWARJLBXo8tCzE9pydD9Q50V6sMMXLGaJS7mePmOhrTNwg8kJuC/ZE7yo6b07H+GzpTOte6DlCTVNztgBuUPNUEvt9V9lvC6eW+w5rfCqMD3Y8brL1X8mIA31AHC2NrP+Z8HKf2KrCsih8ljDButrKOtuK3v20TXxwhYh3bwaD4rAtp5b7/k67gfIVBhCOSD7om/xDsYAwheHywj6x1r30ofoUxgOTLQMS1NjA+E3DuAc/JVvQVHRAZk5E9Bs4G7902C4gPF/64wbZKbeUtWdMYi4apLEgzcR0gCkTRoBtnI9/NY6XU40itwnWunrRXbAscN6tOsVmWra2XipZgn6678AflUcLVZt1muL2rzGBk3NmmTcw1G/VzdcV/yIxTJ8YH3XT5iA5OjCEO5xClHVcF08XFrQ2LJyCKf7/q2XwMlS3AKIm03xx7YBbXaJdyZs5nbHCC4N/6thbG28VktIgSUdQ0uXZUinhP96SEhCE4LWg7McbmOTZ5rvvmZxAJlfi63n1Jl2Qty24AGM/dVLQiPsnVj4gu4JfLfGtMjeRFu7gTvlbz+a52O0svIzkZTEZ0jbSj+2RuAUBJCBZ9VLYezCEHEZCtS6HUTEF1AamUTRSBelmrRzGFGIViNIziyG7MDhh6i0QBC94Nr6NyYr9A72Nq2GrrUmzR5AmTUAz2dgbZ1p2moDs6siCIkTalHfTgKNq2XR7E6dsd8TC2qWmdhRLxh1hX4A7t8Ugex6loC/F3A00cyRiFzwIb6h9W0MyEqp3itFBq7ChwpmP3zrO7YfcV8hBQEV91DpaMW9hq+Ijw7oYF3BbLfr5d6/WloTzdjWN2XElIMXk5in7gn1hu9gfBvY8hKyCx2RT9H85HHLpmLlzRrFMV+gKoZ0I1J8YbMqiAHYPAt5Oh7g/KPjMAYZjt1TRWhUjTRvRRJXsklXb/11CK+mucNu/IfOzjPhb6QnNFO6bMJjjY1hHAl6tCAQg/nxVdLvx7Ro1NXjbJpYtOW6BufMQRjd0eJvTaCuB91W8vsVh9i76tNmhkkz8HiFEhVpj60MDu6hoGot1SL5kk7pIkXPKkxoHQtQnJnJJ6F73+jz6ye0AZzgi+9TFFtazJo2Ua6xIqg4Dchgi2BmoR3E4RTT81ziHJhWwypHyU5r90X6OnPQSacmZITY/1OIpBEABmAQcvmE8sgp3ijt/38beyJx7D+9v4FGJ9BAg== X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 02671726-5ee7-4439-70b5-08d99ecdfc6f X-MS-Exchange-CrossTenant-AuthSource: AM7PR08MB5494.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Nov 2021 13:29:39.1486 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: V7Llyh4ri1fqYV8JsB2IlQ3bkuLb/mShQ63tfYKaEZN5OLYHTiyN0lG63tKOX63iJ4ueak3diaLbkrkj5tphp/O7ykbUk1A6Kk5dVLwj3OA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB5256 Received-SPF: pass client-ip=40.107.20.117; envelope-from=vsementsov@virtuozzo.com; helo=EUR05-DB8-obe.outbound.protection.outlook.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-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+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Modern way is using blockdev-add + blockdev-backup, which provides a lot more control on how target is opened. As example of drive-backup problems consider the following: User of drive-backup expects that target will be opened in the same cache and aio mode as source. Corresponding logic is in drive_backup_prepare(), where we take bs->open_flags of source. It works rather bad if source was added by blockdev-add. Assume source is qcow2 image. On blockdev-add we should specify aio and cache options for file child of qcow2 node. What happens next: drive_backup_prepare() looks at bs->open_flags of qcow2 source node. But there no BDRV_O_NOCAHE neither BDRV_O_NATIVE_AIO: BDRV_O_NOCAHE is places in bs->file->bs->open_flags, and BDRV_O_NATIVE_AIO is nowhere, as file-posix parse options and simply set s->use_linux_aio. The documentation is updated in a minimal way, so that drive-backup is noted only as a deprecated command, and blockdev-backup used in most of places. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Kashyap Chamarthy --- docs/about/deprecated.rst | 11 ++++++ docs/interop/live-block-operations.rst | 47 +++++++++++++++++--------- qapi/block-core.json | 5 ++- 3 files changed, 46 insertions(+), 17 deletions(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index 25b7ec8d92..4a4910143f 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -234,6 +234,17 @@ single ``bitmap``, the new ``block-export-add`` uses a list of ``bitmaps``. Member ``values`` in return value elements with meta-type ``enum`` is deprecated. Use ``members`` instead. +``drive-backup`` (since 6.2) +'''''''''''''''''''''''''''' + +Use ``blockdev-backup`` in combination with ``blockdev-add`` instead. +This change primarily separates the creation/opening process of the backup +target with explicit, separate steps. ``blockdev-backup`` uses mostly the +same arguments as ``drive-backup``, except the ``format`` and ``mode`` +options are removed in favor of using explicit ``blockdev-create`` and +``blockdev-add`` calls. See :doc:`/interop/live-block-operations` for +details. + System accelerators ------------------- diff --git a/docs/interop/live-block-operations.rst b/docs/interop/live-block-operations.rst index 9e3635b233..d403d96f58 100644 --- a/docs/interop/live-block-operations.rst +++ b/docs/interop/live-block-operations.rst @@ -116,8 +116,8 @@ QEMU block layer supports. (3) ``drive-mirror`` (and ``blockdev-mirror``): Synchronize a running disk to another image. -(4) ``drive-backup`` (and ``blockdev-backup``): Point-in-time (live) copy - of a block device to a destination. +(4) ``blockdev-backup`` (and the deprecated ``drive-backup``): + Point-in-time (live) copy of a block device to a destination. .. _`Interacting with a QEMU instance`: @@ -555,13 +555,14 @@ Currently, there are four different kinds: (3) ``none`` -- Synchronize only the new writes from this point on. - .. note:: In the case of ``drive-backup`` (or ``blockdev-backup``), - the behavior of ``none`` synchronization mode is different. - Normally, a ``backup`` job consists of two parts: Anything - that is overwritten by the guest is first copied out to - the backup, and in the background the whole image is - copied from start to end. With ``sync=none``, it's only - the first part. + .. note:: In the case of ``blockdev-backup`` (or deprecated + ``drive-backup``), the behavior of ``none`` + synchronization mode is different. Normally, a + ``backup`` job consists of two parts: Anything that is + overwritten by the guest is first copied out to the + backup, and in the background the whole image is copied + from start to end. With ``sync=none``, it's only the + first part. (4) ``incremental`` -- Synchronize content that is described by the dirty bitmap @@ -928,19 +929,22 @@ Shutdown the guest, by issuing the ``quit`` QMP command:: } -Live disk backup --- ``drive-backup`` and ``blockdev-backup`` -------------------------------------------------------------- +Live disk backup --- ``blockdev-backup`` and the deprecated``drive-backup`` +--------------------------------------------------------------------------- -The ``drive-backup`` (and its newer equivalent ``blockdev-backup``) allows +The ``blockdev-backup`` (and the deprecated ``drive-backup``) allows you to create a point-in-time snapshot. -In this case, the point-in-time is when you *start* the ``drive-backup`` -(or its newer equivalent ``blockdev-backup``) command. +In this case, the point-in-time is when you *start* the +``blockdev-backup`` (or deprecated ``drive-backup``) command. QMP invocation for ``drive-backup`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Note that ``drive-backup`` command is deprecated since QEMU 6.1 and +will be removed in future. + Yet again, starting afresh with our example disk image chain:: [A] <-- [B] <-- [C] <-- [D] @@ -965,11 +969,22 @@ will be issued, indicating the live block device job operation has completed, and no further action is required. +Moving from the deprecated ``drive-backup`` to newer ``blockdev-backup`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +``blockdev-backup`` differs from ``drive-backup`` in how you specify +the backup target. With ``blockdev-backup`` you can't specify filename +as a target. Instead you use ``node-name`` of existing block node, +which you may add by ``blockdev-add`` or ``blockdev-create`` commands. +Correspondingly, ``blockdev-backup`` doesn't have ``mode`` and +``format`` arguments which don't apply to an existing block node. See +following sections for details and examples. + + Notes on ``blockdev-backup`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The ``blockdev-backup`` command is equivalent in functionality to -``drive-backup``, except that it operates at node-level in a Block Driver +The ``blockdev-backup`` command operates at node-level in a Block Driver State (BDS) graph. E.g. the sequence of actions to create a point-in-time backup diff --git a/qapi/block-core.json b/qapi/block-core.json index b290782bf2..f4968d6404 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -1709,6 +1709,9 @@ # The operation can be stopped before it has completed using the # block-job-cancel command. # +# Features: +# @deprecated: This command is deprecated. Use @blockdev-backup instead. +# # Returns: - nothing on success # - If @device is not a valid block device, GenericError # @@ -1724,7 +1727,7 @@ # ## { 'command': 'drive-backup', 'boxed': true, - 'data': 'DriveBackup' } + 'data': 'DriveBackup', 'features': ['deprecated'] } ## # @blockdev-backup: