From nobody Sun May 5 04:21:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=quarantine dis=quarantine) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1620223158; cv=none; d=zohomail.com; s=zohoarc; b=avSt5a4TLm7SYWxJ4RdH6FF97KRgn/Vzf78dxqZXVjwaPt22ISB3LTwAMTtilUEU1Ij9HtpvybXJAJuOYPEXnon49O/BpsrzMwHSM44OmoOVtdYRs99KrsTQ+zZ2+HbpeZ5L4pDS8GoAIY8MiazM0hX0qzXZWA1+TeNv9IKpvZQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1620223158; 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=cf/gKI8A7e3AgnRc6byagRGRWcWvYjlZnrE7Uyq5v8E=; b=jx90c4t2Ydj2raRrvTQ78QVlL8VTlW3Qv/xkIBJ/j9H8IBIpVrzzRAibOgGkSrcGRcprafU3LCH+RnPnn55Uev9yBQsB9ZyFIEJ0zhd0ZMltW9XnYn3vXjoJ8Soj2IZAFXaX8r9o413XgTquyRDdOr/OfsHsBe5B/RNJNDNWXew= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=quarantine dis=quarantine) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1620223158132314.35895700289086; Wed, 5 May 2021 06:59:18 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-117-Sg_oLZ8eMHi9oK6QRO7HvA-1; Wed, 05 May 2021 09:59:14 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9221C1006C83; Wed, 5 May 2021 13:59:08 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9AC9960BF1; Wed, 5 May 2021 13:59:07 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id BD70555352; Wed, 5 May 2021 13:59:06 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 145Dx5M2015190 for ; Wed, 5 May 2021 09:59:05 -0400 Received: by smtp.corp.redhat.com (Postfix) id 0ED592026D07; Wed, 5 May 2021 13:59:05 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast03.extmail.prod.ext.rdu2.redhat.com [10.11.55.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0A011212AAAC for ; Wed, 5 May 2021 13:59:02 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (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 7483F80006E for ; Wed, 5 May 2021 13:59:02 +0000 (UTC) Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70133.outbound.protection.outlook.com [40.107.7.133]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-479-6hAEkY_VNdCLjtHk_G7UFQ-2; Wed, 05 May 2021 09:58:57 -0400 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) by AM6PR08MB4071.eurprd08.prod.outlook.com (2603:10a6:20b:a7::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4087.35; Wed, 5 May 2021 13:58:53 +0000 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::b403:c1a9:6bb7:133]) by AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::b403:c1a9:6bb7:133%7]) with mapi id 15.20.4108.026; Wed, 5 May 2021 13:58:53 +0000 Received: from localhost.localdomain (185.215.60.236) by ZR0P278CA0150.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:41::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.24 via Frontend Transport; Wed, 5 May 2021 13:58:52 +0000 X-MC-Unique: Sg_oLZ8eMHi9oK6QRO7HvA-1 X-MC-Unique: 6hAEkY_VNdCLjtHk_G7UFQ-2 From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Subject: [PATCH v2 1/3] docs/block-replication: use blockdev-backup Date: Wed, 5 May 2021 16:58:01 +0300 Message-ID: <20210505135803.67896-2-vsementsov@virtuozzo.com> In-Reply-To: <20210505135803.67896-1-vsementsov@virtuozzo.com> References: <20210505135803.67896-1-vsementsov@virtuozzo.com> X-Originating-IP: [185.215.60.236] X-ClientProxiedBy: ZR0P278CA0150.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:41::14) To AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 93b473d3-86ad-4f95-1dc1-08d90fcdead2 X-MS-TrafficTypeDiagnostic: AM6PR08MB4071: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6790 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0 X-Microsoft-Antispam-Message-Info: 0L/EqRy6vSOLJMmasxQ8EOlFlpSAoImMbljmy5oe5PuBCjYDJveA55nD+tugkR9W8bzd+eZDtH2x28skfA5DGdzzRMrB+xXpfxvc+4vycNeEudr8dDWpuZHXS7Q/7jeIL8nflg3/KBkKBwdV4fLorOgssLNiME3Fpxw/gnpmRQymTS1G/MLsHWWUqNp4HtTkQgiWgmXIyZwM4nN13zMhtP+CNCWeSyaCZTTv0yYIcojJCmKqzqPZ7DCA09I/ljxfWKe15v0GaKl8dwOrp9MusQtmHHFajoeQkmdflz2nyQ7ba8L6qFHScX/sOTtwKOqkfdh7nWkaqUHzvJ+OGskAyb5EKf8/akdI7Qu3kobTnxrmI8NIQO7nT4bQbtcEAoAQDyKFm9pPos+0AelCWbRgvaVzCUVGA390yyOVk7dl4ZGUUCuRxXLRzRn8TeSKWN6JUx2GJwAwZ6vJqvY3PaJe1os3WG+n3dkzDy23TPZPZSVWLuDsC2PYfC0UYXbv6Z+nay/bIn6W/kF6aHyJ8iMC8RrnFqGFIg9IACbXxjwrJqoQj6eSceXM2leiN4C8Y+vAwYvMyKwKaXAA+b9FVCmzgJAAqLnWFF2GkZF8ZAjjYwmWfH+NZPK7XAkD98cNhWn6aDsWE0UuxL6l8xUEyQAEQwAx9/T1sIHA31vxL3LCayV76TlQ7f/k8TgGrpALc5Zh 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)(39840400004)(136003)(366004)(346002)(396003)(376002)(66476007)(6916009)(2906002)(36756003)(26005)(316002)(6506007)(83380400001)(6512007)(956004)(186003)(16526019)(6666004)(478600001)(52116002)(86362001)(7416002)(38100700002)(8936002)(6486002)(1076003)(4326008)(8676002)(66556008)(5660300002)(38350700002)(66946007)(2616005)(69590400013); DIR:OUT; SFP:1102 X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?rwWVME2aHVz3Q7RlzfecpG2dBKwmIyTSu+PQE2q9a8DaPPF1oerYYUJbyWvu?= =?us-ascii?Q?d8rOyQXq7gTcWVy7rHLQY+hS03/r3aT7XISxIcmD2bOkWim3z8ynSiAmc4Bo?= =?us-ascii?Q?4EPtK0uvznOT04hrdWq2YCF/LLmoln6LCyM/nwlG+GD5pW/Mi8MqZ0f6otvJ?= =?us-ascii?Q?5dfBeP7MsiOrftnjTYPu+cC1YFBYK4CEHlIBzAt7SbpgjEDzr38Xhg5EvVNK?= =?us-ascii?Q?mdtWgr9XKtGcg5uYPmtpXrfFzYTrUC/GCPTetcYu8pA4NU7qcUwAJOnj6pTL?= =?us-ascii?Q?dhQqjYQQU3fU6BudcyqruunkyH0o+uNnGdttLjB4mPbJLAekcwRwx2u1j/6f?= =?us-ascii?Q?7n607GklOqQgoJp9fS1bsp7LigSSEY1ccYwgqLX9JIZyh5JFM7hGYKCP11D+?= =?us-ascii?Q?/7XxRa/jKWntPCJl0Pj21dEb8p3oqU764CEbk8yPik9c2oCcS9KCQ2trvWGd?= =?us-ascii?Q?eiQVoYJQO7JT1WrMBnND4lHY/IScTuCWFkffeWHrvbIcdolnZzRcENkORKV3?= =?us-ascii?Q?qJC3iQrJpopUnHNyoPOm0AZRUG8QeN13jqF5IitSKX0L0k53AD3tm6m64zJL?= =?us-ascii?Q?07xB85PGV/iAyyrF0eCS/8DJbNGmIpash5qZ9kzw42buh5x0fEvq1iVpeVuD?= =?us-ascii?Q?xXELZd73azQC/IBRzuwKajvAtKKbU5ZPPXfJxSJCS98TUUUwzdDuC732yl7m?= =?us-ascii?Q?j+BUNUYl09C4JFE8yjSHscMz0c4hpPczT9vlyk1apY1aLqtn3F0TnklxwwUs?= =?us-ascii?Q?IDKW1tvL52Of4sfiUr4YGXaGyX8Te3atgbSD3oVH3h/SrHIH3X3369M7l04c?= =?us-ascii?Q?J4uC1iAGofpFckSnzG4m53MGQmd6cNT/aHAEYOrrSNJMs0JmehN7gf9H7lYC?= =?us-ascii?Q?TUxH/7/yITORDTsUFpq/FP9v4PxK6yVR+hu8bQAtN3yqdLLeud4FoaRYBJ/a?= =?us-ascii?Q?A18C0RRgAn0NFmXz/XP2+gb52BlmSko32yzg2wt6TLXZXnNocosT93DAA8iK?= =?us-ascii?Q?lkdLdcvttwTpILo5wYM6QgWfUZgb3fnXc2TtNMla1AjlKvnaiEZ3l/K0tWD7?= =?us-ascii?Q?gSC9TEFalhXozsilS4T7qRty86+wGQ5EyoKxUQ+5jZue/SMgFKRj5IIRC8I7?= =?us-ascii?Q?K3QrRCBD9/kieQAOIKcy3yoGRZu1KllCByjf0brgXvoJDzoaX3yj5fnz1Yic?= =?us-ascii?Q?BP3KXBLQ/V09ld9vHiyNC/jnurOZ19pk39WMdeXuITT53lp6tTeQdNsWJXh/?= =?us-ascii?Q?fFtbR/cHVmHsEoHcY+4j9dROZxXQ7WiE0OOXFVJ1P/uwOo0kXJe+CG4fnd12?= =?us-ascii?Q?A6/DQ5CXm12r1PtL2okvjtsq?= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 93b473d3-86ad-4f95-1dc1-08d90fcdead2 X-MS-Exchange-CrossTenant-AuthSource: AM7PR08MB5494.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 May 2021 13:58:53.4057 (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: t/C0iu/jNVzKkOVokwvwNBJ2fSJnKs++znc2sS14M2nawMkLJaOIYvDzdgpzbsxAFI+TWA0bOsWD+yDfB5WcueUD2+JfycoVh9CpLyRjQMo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4071 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 145Dx5M2015190 X-loop: libvir-list@redhat.com Cc: vsementsov@virtuozzo.com, libvir-list@redhat.com, jsnow@redhat.com, xiechanglong.d@gmail.com, qemu-devel@nongnu.org, pkrempa@redhat.com, yur@virtuozzo.com, nshirokovskiy@virtuozzo.com, wencongyang2@huawei.com, den@openvz.org, dim@virtuozzo.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 <--------- h= idden-disk 5 <--------- || | | || | | || '-------------------------' - || drive-backup sync=3Dnone 6 + || blockdev-backup sync=3Dnone 6 =20 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. =20 -6) The drive-backup job (sync=3Dnone) is run to allow hidden-disk to buffer +6) The blockdev-backup job (sync=3Dnone) is run to allow hidden-disk to bu= ffer 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. --=20 2.29.2 From nobody Sun May 5 04:21:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=quarantine dis=quarantine) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1620223171; cv=none; d=zohomail.com; s=zohoarc; b=jy8ftPjK0HMBcRJoxfeJJvvM1MufVhA2VMJKPuah7glaIuKZzCLE1aoD5ZoEadoCXgiLYoAaafMZZbUVZAKJSwZt7QdbmIWe09qdseIYZChz19F8yGNUWXF9WQH7Vo8pDb14e/0Mfw+Cmibs6bDCEotlnNuiuiG2ghlk0dqfBDQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1620223171; 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=NFQCltJH7MkIdedMj/L2uumEpXtZMo1gMDgSMrWhfGY=; b=SBBVY0gK4OHsUWj1DEbVOjPlHtXuDCbJCCrkqJzzzxO/Tofktu86YCAgT4V0nVqX1Y/oYyxfUiLqNx11lGCnetGgE4XHalxcmyHZDk1uye8qBo1HGLlgErzrVoAk7mIMns1JA0BE7XQDzFcR/kOR0j9t5bA2B44HoMT+qxEeeVQ= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=quarantine dis=quarantine) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1620223171342433.31561943620045; Wed, 5 May 2021 06:59:31 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-277-bMoyLauVNguBt5ud-0aYfg-1; Wed, 05 May 2021 09:59:27 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 066E9835DE0; Wed, 5 May 2021 13:59:21 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D38835C3DF; Wed, 5 May 2021 13:59:20 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 9B8411800BB4; Wed, 5 May 2021 13:59:20 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 145Dx6nG015203 for ; Wed, 5 May 2021 09:59:07 -0400 Received: by smtp.corp.redhat.com (Postfix) id DD440115D7BE; Wed, 5 May 2021 13:59:06 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D8B87115D7BC for ; Wed, 5 May 2021 13:59:03 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (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 D4E4718E092B for ; Wed, 5 May 2021 13:59:03 +0000 (UTC) Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70133.outbound.protection.outlook.com [40.107.7.133]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-479-gAxq9_GnNVG-6Oj2982ydA-3; Wed, 05 May 2021 09:58:59 -0400 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) by AM6PR08MB4071.eurprd08.prod.outlook.com (2603:10a6:20b:a7::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4087.35; Wed, 5 May 2021 13:58:55 +0000 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::b403:c1a9:6bb7:133]) by AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::b403:c1a9:6bb7:133%7]) with mapi id 15.20.4108.026; Wed, 5 May 2021 13:58:55 +0000 Received: from localhost.localdomain (185.215.60.236) by ZR0P278CA0150.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:41::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.24 via Frontend Transport; Wed, 5 May 2021 13:58:53 +0000 X-MC-Unique: bMoyLauVNguBt5ud-0aYfg-1 X-MC-Unique: gAxq9_GnNVG-6Oj2982ydA-3 From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Subject: [PATCH v2 2/3] docs/interop/bitmaps: use blockdev-backup Date: Wed, 5 May 2021 16:58:02 +0300 Message-ID: <20210505135803.67896-3-vsementsov@virtuozzo.com> In-Reply-To: <20210505135803.67896-1-vsementsov@virtuozzo.com> References: <20210505135803.67896-1-vsementsov@virtuozzo.com> X-Originating-IP: [185.215.60.236] X-ClientProxiedBy: ZR0P278CA0150.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:41::14) To AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 368c093a-028d-44de-1f6d-08d90fcdebb8 X-MS-TrafficTypeDiagnostic: AM6PR08MB4071: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0 X-Microsoft-Antispam-Message-Info: RjCeNNrWtQNg+yHjb1NcMSDD8qJFIhGsY5QFgHs3f8BOgI8WvleVgfuu90zZPNxHg8IQHkFwV9xxOIY6L1RJrQLLPMuCJqeo8n8LBpWWX/wb3XtA04FRV8fm9ahZG32URiWYOHrf0snXBc6rQ8uJgmjF2PM9FnbWoL7HVuynEkOV5fkcDRR9VNwOhRbT4wGwJ1dqNfFEn3UzDWj3qW035h82IYnRgxcLfN1sXx5Eke0UjP9XGTt85684LDyExVnLVdc0GfI3htm8TCFTOE9cUBJD3YLNPq24y4qtFKeVVIEbiuoPNukEnnEtV/+0zWOsv7wQ5z3ODDdR1JPdkxnbB2cTX0FjShRzb3MZ1VMgm1nWJK7FyfAmKtt1wrONBNpmiqigK6JfnxNwBAadyRy8XbjriGG/j8Ao0Q0fCmr0IJkfwDZNLQPfsDSeMUwmgAYh+V7Fn0TebnvjCJ9ddVg6BUHhlhJQ91+gd7jmYSMgzhcXyQ3Q/Q2gfLZSXdLChpqLHp6kTVH4J1AB2CrLVqM/gC8mZXPSZij11cGRYrsEx+wrdcvYOAvtTS8iJ1W619Dsln2igWj/h5j7Z8CeRFPkw4qtcb/R6RiWunnTrhobJyxXWBOVGM8bqF3e9Ml5S8KZBAAhqi0bHAEY+r4HFUHCDAiplFPBS30ItEp8baDj1dtLffXHLZsBWHvd3hHV9iTF 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)(39840400004)(136003)(366004)(346002)(396003)(376002)(66476007)(6916009)(2906002)(36756003)(26005)(316002)(6506007)(83380400001)(6512007)(956004)(186003)(16526019)(6666004)(478600001)(52116002)(86362001)(7416002)(38100700002)(30864003)(8936002)(6486002)(1076003)(4326008)(8676002)(66556008)(5660300002)(38350700002)(66946007)(2616005)(69590400013); DIR:OUT; SFP:1102 X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?QEotw60fT90NPvmCUOnDwfsbNTlCOId1nZNHhLObMU6EgMpIOl+0tUfHEYQt?= =?us-ascii?Q?vywOo1V4nTxVWnFsJAl5muF6WbtdMneSnKW0nboJOH6B85A0UBsme4hCTxpo?= =?us-ascii?Q?5DwaQv3hRGvuhH9TZHBPaC4V6pOJ/4cZ91+Kjia5vFSi3RBUUlxcQC0ih3vC?= =?us-ascii?Q?0zY1TmobU5p1txxpdJSjMI91gJKraMtxoGW8zlWs1RPEwg5QnDzBhcg3s0l1?= =?us-ascii?Q?5S7XJ16W7eQsUXzQ+n/gZ1I3cFG/W1JDfhFKUL5ahWqAYk6dxDn2urPFTE+M?= =?us-ascii?Q?aGKfXiurPi9GnM0bsR/KPzCPDsmcakU8Yyhs460UtlsO+atkVYt87/+4GJLe?= =?us-ascii?Q?YDtsxzzZFhL77AM+uOszo/idxGhk1UcHQrOEOutaAatKPn2CNQaXO5oVckO8?= =?us-ascii?Q?cU1roO0XVe+77Y/iSY3NFM9agIJW7NZwgb41jXPm0TvdVgHLHFWxddVhLdJB?= =?us-ascii?Q?/JAnIp8RZTMwTypnoC/Qob1BZHI0ykzI5hZ1VNdaIfYqcjExA1FXrXFruoPO?= =?us-ascii?Q?4o0KLPbbncC9jkunrnCKsZ5KjYGfgaUWYnFG6wB1FgkExfjkjNDvn+SVOhgd?= =?us-ascii?Q?D3Rq8pNfpXEwoiTaDjOvPHE+XGDAfoXIPgAxxhrLWV7CECArmLCInh4TTYlS?= =?us-ascii?Q?S4GO4RCEBWS5DmISAmbo0pjflFpKXdEYBSiqoGtWT+KtyBeGcf8q/qkmxRXW?= =?us-ascii?Q?7/zj46MERGvYBKxSUlOEYDNJOdpIgpyg4O4CaVRa4gsxur+06kNBd9Ly8/5e?= =?us-ascii?Q?749knBwO1M5rC8keHFbC7YQHJ3j8is2WvL1Lnfb2vamv7zGsvX0u/5bqvoAI?= =?us-ascii?Q?/qCk9uZUJDzhgOIgP80SkMvLy3YVYhdEM7Hk0VlziJNZtF/EoP4uOBdwOcy5?= =?us-ascii?Q?jaCHKEDohvEMpMBUZuOPV89HC+5ugjpE28sIFnQ0sWWd87uoz9H+sPWEQWnR?= =?us-ascii?Q?Dy1fNY30aN/JZmEMbNJUwnosYN3Vssl/qWQL/Ig89E8KEdc7YjSh2SpFNosW?= =?us-ascii?Q?UQ61oEqnx1cVnJQfoJEiX3SMVw/6gVOiW3hRi2mKxp5IdS3nQW++i83oJzIh?= =?us-ascii?Q?80m2mx/aahs/5WRnOiJZEeXtlF88qxN69NloYei7r180+QzdgJw1O8RjkrKM?= =?us-ascii?Q?JLxXdMGOmOPIUYtdqn7o8ak6UufFaH9r3gJlwQ8O6JpP70e/TGBiYtWIM3Pd?= =?us-ascii?Q?W3wfwIKzgYd5cno/M9IeldGiz+eVWuVaj3fVL95TPZ9ZUXtGy0RI0lH8qarG?= =?us-ascii?Q?NPuWSL+jLTxVoyvnLoyoG17Opu3WI+CvllFSUJuugQlFvRATOOQV+DAOOOTo?= =?us-ascii?Q?P7L5tk9BVtcfR3ZcIUz75rSd?= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 368c093a-028d-44de-1f6d-08d90fcdebb8 X-MS-Exchange-CrossTenant-AuthSource: AM7PR08MB5494.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 May 2021 13:58:54.8902 (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: WjEfnB/Rqt24gTBuNQXa/yAbzfDH5xLfW/Wd0LTB4jvcAd/sW0ogiexfH5jUiKDUoaEJ2hpXxZH/PrwJzlCQkYxkMQAugMyjZ9/TFsE9vCY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4071 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 145Dx6nG015203 X-loop: libvir-list@redhat.com Cc: vsementsov@virtuozzo.com, libvir-list@redhat.com, jsnow@redhat.com, xiechanglong.d@gmail.com, qemu-devel@nongnu.org, pkrempa@redhat.com, yur@virtuozzo.com, nshirokovskiy@virtuozzo.com, wencongyang2@huawei.com, den@openvz.org, dim@virtuozzo.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Kashyap Chamarthy =20 --- 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..ef95090c81 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 r= econstruct a full backup from the point in time at which the incremental backup was issued. =20 The "Push Model" here references the fact that QEMU is "pushing" the modif= ied -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. =20 -Both of these commands are jobs, which have their own QMP API for querying= and +The command is a job, which has its own QMP API for querying and management documented in `Background jobs `_. =20 @@ -557,6 +556,10 @@ create a new incremental backup chain attached to a dr= ive. This example creates a new, full backup of "drive0" and accompanies it wit= h a new, empty bitmap that records writes from this point in time forward. =20 +The target may be created with help of `blockdev-add +`_ or `blockdev-create +`_ command. + .. note:: Any new writes that happen after this command is issued, even wh= ile the backup job runs, will be written locally and not to the back= up 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 =20 +#. 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: =20 .. code-block:: QMP =20 -> { - "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" } } =20 @@ -785,20 +802,36 @@ Example: Second Incremental Backup $ qemu-img create -f qcow2 drive0.inc1.qcow2 \ -b drive0.inc0.qcow2 -F qcow2 =20 +#. 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 tha= t we have changed the target image below. =20 .. code-block:: QMP =20 -> { - "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" } } =20 @@ -866,20 +899,36 @@ image: file for you, but you lose control over format options like compatibility and preallocation presets. =20 +#. 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. =20 .. code-block:: QMP =20 -> { - "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" } } =20 @@ -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 =20 +#. 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: =20 .. 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 =20 +#. 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: =20 .. 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 sing= le-job failure case: $ qemu-img create -f qcow2 drive0.inc0.qcow2 \ -b drive0.full.qcow2 -F qcow2 =20 +#. 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: =20 .. code-block:: QMP =20 -> { - "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" } } =20 @@ -1164,6 +1287,19 @@ described above. This example demonstrates the singl= e-job failure case: "event": "BLOCK_JOB_COMPLETED" } =20 +#. Remove target node: + + .. code-block:: QMP + + -> { + "execute": "blockdev-del", + "arguments": { + "node-name": "target0", + } + } + + <- { "return": {} } + #. Delete the failed image, and re-create it. =20 .. code:: bash @@ -1172,20 +1308,36 @@ described above. This example demonstrates the sing= le-job failure case: $ qemu-img create -f qcow2 drive0.inc0.qcow2 \ -b drive0.full.qcow2 -F qcow2 =20 +#. 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: =20 .. code-block:: QMP =20 -> { - "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" } } =20 @@ -1210,7 +1362,8 @@ described above. This example demonstrates the single= -job failure case: Example: Partial Transactional Failures ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ =20 -QMP commands like `drive-backup = `_ +QMP commands like `blockdev-backup +`_ conceptually only start a job, and so transactions containing these comman= ds may succeed even if the job it created later fails. This might have surpri= sing 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" } }] } --=20 2.29.2 From nobody Sun May 5 04:21:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=quarantine dis=quarantine) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1620223158; cv=none; d=zohomail.com; s=zohoarc; b=X08G+Gvh7bIfsiWwhA7HB/iRmTng2yAnhmr2MMj67eAjzK2MQUsGFte5um9XqdgdsSBbqDUl/6e/WAIwJkFDp4+HY4p/QhkGxsx9OUxeD9CdEZ6u9GY+BX21FHXyd0KuOVsGrgrRG5haEE/JCl1aqs2hF8VvOJp9OO94MOq0gHU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1620223158; 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=GeSmp9IdnS99SxoqHutwshzeQfNsboNYpjAzxOkGkGA=; b=JKrjxvQvBZvhZOkGBgGjLjwUyi53L1gGBuPxZ2uu8M7QUFA+4PV033dB7SrTZUVZHPxaPTni1iLs3S9doQZjHOdz7scxjqjCOymcHURIprenub8F+zJvPK/FHaQ73/4WPC8LBoPRpKiOhQUX8esRPlgfRoekn6fzjGIcqLpyPv4= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=quarantine dis=quarantine) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1620223158298694.8293081567637; Wed, 5 May 2021 06:59:18 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-517-yydXvJzKMjS_52FIFo0icw-1; Wed, 05 May 2021 09:59:14 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EB115107ACC7; Wed, 5 May 2021 13:59:08 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BF53A10074E5; Wed, 5 May 2021 13:59:08 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 3864455357; Wed, 5 May 2021 13:59:08 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 145Dx6j6015195 for ; Wed, 5 May 2021 09:59:06 -0400 Received: by smtp.corp.redhat.com (Postfix) id 217C22026D07; Wed, 5 May 2021 13:59:06 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1CBB22018298 for ; Wed, 5 May 2021 13:59:06 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (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 F08D818E092A for ; Wed, 5 May 2021 13:59:05 +0000 (UTC) Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50119.outbound.protection.outlook.com [40.107.5.119]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-464-fEfWfwAJOI-Qr6iCu02HnQ-1; Wed, 05 May 2021 09:58:59 -0400 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) by AM5PR0801MB1780.eurprd08.prod.outlook.com (2603:10a6:203:39::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25; Wed, 5 May 2021 13:58:56 +0000 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::b403:c1a9:6bb7:133]) by AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::b403:c1a9:6bb7:133%7]) with mapi id 15.20.4108.026; Wed, 5 May 2021 13:58:56 +0000 Received: from localhost.localdomain (185.215.60.236) by ZR0P278CA0150.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:41::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.24 via Frontend Transport; Wed, 5 May 2021 13:58:55 +0000 X-MC-Unique: yydXvJzKMjS_52FIFo0icw-1 X-MC-Unique: fEfWfwAJOI-Qr6iCu02HnQ-1 From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Subject: [PATCH v2 3/3] qapi: deprecate drive-backup Date: Wed, 5 May 2021 16:58:03 +0300 Message-ID: <20210505135803.67896-4-vsementsov@virtuozzo.com> In-Reply-To: <20210505135803.67896-1-vsementsov@virtuozzo.com> References: <20210505135803.67896-1-vsementsov@virtuozzo.com> X-Originating-IP: [185.215.60.236] X-ClientProxiedBy: ZR0P278CA0150.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:41::14) To AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 40076bc1-f182-48c6-75ba-08d90fcdeca8 X-MS-TrafficTypeDiagnostic: AM5PR0801MB1780: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0 X-Microsoft-Antispam-Message-Info: pdkJrDiCBPMPL4fpW3Pl8aXlPJnJPnjaoK4w9wFTzDU4Hny/Dv6nBaEfOp1O4502Xctm82D6/Ad+0LyPdGM3Y32K5y8VlilrsfWTXNxliMZo8Df4/cmxKTJq1A44qQq7eOtSYwhPws9HHLY6aRmxS3eMZw133yxp50xpX+XgTVGC6aeo77kNQR4xMr8pHzkfuzjY5+lPdw6dB7WDDqc/YYx/IQ4AjuVoa20V4ho35J8qgFX6axG7chhydEbp4b1XROpWzRlDSMthHDziq+HeuwedOqy/HgGzpmSenVJ5CtoesiUQxr8UXbdnuEqj/gdzzq/bgZTWvhB+YByLO/G+h8nSuCyPSnWHRsYkFvJPmTo2yGvJk4nTgRxyCbWSklHpNnLNFMyLNBdSCz/jVtccCcxct/COELWwLpwnyYaqF2yAHfORlC5xxChs5tm3l9eDyyBkMhrnszpjpyWw5YD+4usfXKVxL2v/NFaqt2FQhzpEFdPc/15GG1ZOj73pylhCAGXjjrM8CJDpyBy6frp0SGEIplw+XoSFGemGnKDkXJmez3bffq5jLmoDDNMSYcQhKgDI+0knatfMigND1zJ1QOEAEX0sxO153Bvq7BS4QzrnuOim1bWmsKItKnDGJkhzbYXi1556f+LFugHURZfojiwJ/PiuodL/niT+LltzeG4OMGy4+zwk3GOQCvQOUm0L 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)(396003)(136003)(346002)(39830400003)(366004)(376002)(186003)(38100700002)(2906002)(26005)(1076003)(16526019)(6666004)(7416002)(8676002)(956004)(86362001)(38350700002)(36756003)(316002)(8936002)(2616005)(4326008)(5660300002)(83380400001)(6916009)(6486002)(478600001)(66946007)(6506007)(6512007)(66556008)(66476007)(52116002)(69590400013); DIR:OUT; SFP:1102 X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?XGTLVi0k9J7v/7HxFL4jwOQKAyWmOlh815ts4IW2jNXX2XbswwOEXKB0xKrz?= =?us-ascii?Q?J/UOLAnxH8TPaL/y+bOf2y5+myHVTUfguDfB5tP/LlrBc/Zh/bG0QMvQ+6FB?= =?us-ascii?Q?AW66Bgp+7Z6qcnlWDCohwwTQMOF+ixyARFxOJnx/BzutQiuZwl03GXOA5Fdk?= =?us-ascii?Q?XZpSj81hlBoNK19mCF0Agk66nILGptjLFzVpogD6rGOjSD6oDdCF3CRXvqME?= =?us-ascii?Q?6NHbwoSL2iSHKxQX9Rbnx4WHIRRcNuouan780ufDWxOzhsDzXwdCn7tUKwSA?= =?us-ascii?Q?CtBdFchNCb9R4BidrpKLB+QAYk59eN/X8Z32Davqa2jQyPnR2d4p/c8aRJsu?= =?us-ascii?Q?BsZuh+8jU7ZlvTdxeWVeAQ1MeYFAfab3hfnVhvTxfdFzijbJ+joQBdxJ1BNj?= =?us-ascii?Q?S0//pAVXbR52RxD2ZviyENO05Cnxjs9HPhYOHvkjZZkWPTg7UHm7m7qhhj88?= =?us-ascii?Q?DTWWUSRtY9my73OfX1hVMWxZ9cJ1xqCp3aYv9RaEpzmV/qdE7d1GPi6koGXw?= =?us-ascii?Q?b5Ch8Ika1o/u8Xu6VAPEu/WADa72qxqiJKE0Yh74dvJqZMuzVsap/83MB3bg?= =?us-ascii?Q?iuvY22r8SohPBT+ND5D3tkorGnPx/nVpizwBYbrrqh33WzI8q0hF8Fc+8tj/?= =?us-ascii?Q?k2nl8uYq0M/qPNSdraBHA2uVJxf7z9KZNe5mIYujLUmAy164/++osh2sGQEg?= =?us-ascii?Q?+6kP+zCwGViaLXK1qXW8BBfzxv23r5C7n214tCQ8XfsxZRKUIv7CiE+sOiDl?= =?us-ascii?Q?DDqckbBxz8m+mA/fztaZRKhrFmrr6BXF+7c1wqXkrI614XuoGwl1e3Wi8TXk?= =?us-ascii?Q?VkdS2t7WUzYL8tlaMDIOJAbqfwdJdpk+zePLBvjzMsT8FkKkYldU6ntdIkiQ?= =?us-ascii?Q?SIqItRlmhxyfvldmx5AEctGZTU829u7LtQ2Y3aJYtR/ZwRmSz4/Rm6XanNzn?= =?us-ascii?Q?/PZ4vPWwj9kwhpz+MDBEDW1a1oaEio1w32pRw0CYA31znyl/U5l4XYcGde/k?= =?us-ascii?Q?Pnk4ypr0UVbRARkjcK0jThUtO9tq9CNPfEAc4GfQE6spc2u0m5bkKqqi3E38?= =?us-ascii?Q?lH7SJFwlIErewRBFfYRIz9QsEh+p0flogzjt/e0v2pDPQgSJh8xDkpc4H5Sz?= =?us-ascii?Q?ZG4yecHmDuDfbVb5BBMhvQ0Ntr/kakRXiaus7xQIAKb0tKINLSQiI86Su5C7?= =?us-ascii?Q?4Ney150bW4RmcsPYcg14HegWbPV3ah9/xL0OKy9+UpR0lE3J15S45YSIPq1K?= =?us-ascii?Q?qox3zeQi2tzQGi1SEsvxUNB1vrRLicZjdOhLW5AqMQbFiEE8P/pziJwGsvZs?= =?us-ascii?Q?fTzCHu0Vdv+gON+pfrls/GeA?= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 40076bc1-f182-48c6-75ba-08d90fcdeca8 X-MS-Exchange-CrossTenant-AuthSource: AM7PR08MB5494.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 May 2021 13:58:56.4145 (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: xcmPBAZaTv1MvHQLvIa3QKC+l09ik/WgNjaczBk3cXV/BGItTYXqPox2jQcYBUa4mfuYjNWnKJQu1GieXTj5V6mYz8V2gVna2sr1AL3GLsU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1780 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 145Dx6j6015195 X-loop: libvir-list@redhat.com Cc: vsementsov@virtuozzo.com, libvir-list@redhat.com, jsnow@redhat.com, xiechanglong.d@gmail.com, qemu-devel@nongnu.org, pkrempa@redhat.com, yur@virtuozzo.com, nshirokovskiy@virtuozzo.com, wencongyang2@huawei.com, den@openvz.org, dim@virtuozzo.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 --- TODO: We also need to deprecate drive-backup transaction action.. But union members in QAPI doesn't support 'deprecated' feature. I tried to dig a bit, but failed :/ Markus, could you please help with it? At least by advice? docs/interop/live-block-operations.rst | 47 +++++++++++++++++--------- docs/system/deprecated.rst | 11 ++++++ qapi/block-core.json | 5 ++- 3 files changed, 46 insertions(+), 17 deletions(-) diff --git a/docs/interop/live-block-operations.rst b/docs/interop/live-blo= ck-operations.rst index 1073b930dc..f71f79ae2a 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. =20 -(4) ``drive-backup`` (and ``blockdev-backup``): Point-in-time (live) copy - of a block device to a destination. +(4) ``blockdev-backup`` (and deprecated ``drive-backup``): Point-in-time + (live) copy of a block device to a destination. =20 =20 .. _`Interacting with a QEMU instance`: @@ -553,13 +553,14 @@ Currently, there are four different kinds: =20 (3) ``none`` -- Synchronize only the new writes from this point on. =20 - .. 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=3Dnone``, 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=3Dnone``, it's only the + first part. =20 (4) ``incremental`` -- Synchronize content that is described by the dirty bitmap @@ -924,19 +925,22 @@ Shutdown the guest, by issuing the ``quit`` QMP comma= nd:: } =20 =20 -Live disk backup --- ``drive-backup`` and ``blockdev-backup`` -------------------------------------------------------------- +Live disk backup --- ``blockdev-backup`` and deprecated``drive-backup`` +----------------------------------------------------------------------- =20 -The ``drive-backup`` (and its newer equivalent ``blockdev-backup``) allows +The ``blockdev-backup`` (and deprecated ``drive-backup``) allows you to create a point-in-time snapshot. =20 -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. =20 =20 QMP invocation for ``drive-backup`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ =20 +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:: =20 [A] <-- [B] <-- [C] <-- [D] @@ -961,11 +965,22 @@ will be issued, indicating the live block device job = operation has completed, and no further action is required. =20 =20 +Moving from deprecated ``drive-backup`` to newer ``blockdev-backup`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +``blockdev-backup`` differs in a way of specifying 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 existing block node. See following sections for +details and examples. + + Notes on ``blockdev-backup`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ =20 -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`` operates at node-level in a Block Driver State (BDS) graph. =20 E.g. the sequence of actions to create a point-in-time backup diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst index 80cae86252..676d72a1ed 100644 --- a/docs/system/deprecated.rst +++ b/docs/system/deprecated.rst @@ -186,6 +186,17 @@ Use the more generic commands ``block-export-add`` and= ``block-export-del`` instead. As part of this deprecation, where ``nbd-server-add`` used a single ``bitmap``, the new ``block-export-add`` uses a list of ``bitmaps``. =20 +``drive-backup`` (since 6.1) +'''''''''''''''''''''''''''' + +Use ``blockdev-backup`` in pair 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 ------------------- =20 diff --git a/qapi/block-core.json b/qapi/block-core.json index 6d227924d0..8e2c6e1622 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -1642,6 +1642,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 # @@ -1657,7 +1660,7 @@ # ## { 'command': 'drive-backup', 'boxed': true, - 'data': 'DriveBackup' } + 'data': 'DriveBackup', 'features': ['deprecated'] } =20 ## # @blockdev-backup: --=20 2.29.2