From nobody Mon Feb 9 12:30:04 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=virtuozzo.com); dmarc=pass(p=quarantine dis=none) header.from=virtuozzo.com ARC-Seal: i=2; a=rsa-sha256; t=1636481372; cv=pass; d=zohomail.com; s=zohoarc; b=hUCQLq62oeLW4bqGl4th3y+89e56ll/FjYaMdk0eI4yg1bkh03BGeaQnFsmBiyf43Wwju/Lwm8R3oQudt1ZzCzMVFLuNM9pVv13EHGknG5gSCpfdhWP2/78QMpVMsqwcewlgHr7xKOj+jCWF9QW6I2arzg0XcRxt260GLJF1e9w= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1636481372; 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=Z9JeR1xN9cce6P/AsOfeQhAmRGK9j6gJWdokclE5hn4=; b=g7HK6GapgCEmaidIOKoGMgQWCP9DSwe4iBA1tIKUixwImHsH+ETdpRNIYpoG4mcfS8md1d94Qgxt1+4V8NJ8/w+2cvok8EzXwCh1/0D26m9CSI6abZVKowj3K0rBTsc6MLJPVu7QFgjN76ugzeZ2k87/F5j7pMppwefVjjtpsI0= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=virtuozzo.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1636481372259834.9620112005585; Tue, 9 Nov 2021 10:09:32 -0800 (PST) Received: from localhost ([::1]:41924 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mkVYp-0002zm-82 for importer@patchew.org; Tue, 09 Nov 2021 13:09:31 -0500 Received: from eggs.gnu.org ([209.51.188.92]:48614) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mkVXU-0001M2-6O; Tue, 09 Nov 2021 13:08:08 -0500 Received: from mail-eopbgr150138.outbound.protection.outlook.com ([40.107.15.138]:40966 helo=EUR01-DB5-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 1mkVXS-0003EZ-FU; Tue, 09 Nov 2021 13:08:07 -0500 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) by AM6PR08MB5077.eurprd08.prod.outlook.com (2603:10a6:20b:e6::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.15; Tue, 9 Nov 2021 17:52: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.4669.016; Tue, 9 Nov 2021 17:52:38 +0000 Received: from kvm.ch-qa.sw.ru (130.117.225.5) by AM6P194CA0059.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:84::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.11 via Frontend Transport; Tue, 9 Nov 2021 17:52:38 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mIfHElark8Q01lohBqB4W7xrHvmBBlgSzJf43TysuR5E97V+2tEB9MJY4D5l6ySQ3SgHFn7Co+vkB6YoPU8tbOguuykkZjl8npj+9sHn1v6Ee+1SP8Kn6ktudp8Qk+tsu3mUGvL/tOfzKKuDDxNmS8atUGSuQdu95lRxcMgMsknv6VQ4nNJxejGTkENxvFXErzLj6g0g5TT0kRIBbwl6K45w0scMNLpE06KLqyzLRJQ2WzgBQziB2w0C/HZ97AEn4j3cMbAdXWAegrQc7X6svFmgpCb0qG6xlEiodwYMoCk4dgMUlDhn5YS6wQ11RhH/+QoVMFDAfIMOSe582KoXyQ== 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=AOBO4UYTta5wbUtitp9kPz5ADk6cwanQQb/BqaKQdrAAz0Me7AukFSxdL80GrafhmUcBjGLWWt7VlJVSV7vj1pmpXqnpCV/e5ne+pNH8CrhbyOD6MkuXBGzbQc7Q8RLDf+lyHQWNO75wAZYbZAjuRgHssawuCIxuxZpaRhbNhAOfM472d3bpxw0fGHNHf1eDzBzf+Gl1PsFnuHYoxLJIv+PK7ZrTAY2Ee4TWcasIeXSiLEa15C84hBmJhBmTktu7EGQdB3xajJxK3YNYxIrePBGG9Px1p9SGGzJ/lcauF2BOnjZhybUQKcX8ksvfD9Uy+mKcztDbjBggfmnDJ01DwQ== 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=keXpwRqkRKHdobU1KKEw9wL/hRQ1ibWQo42R3RYSwZ78v8qvXN8IQK2R/0Dkzw9oCeW6jJrpMwcfxCuVJJlBxnSRW6jbrVrCDXncn7FGDGgRPSwfIyZ31IpzPsYiF3zbN6xz//DyBsKfxz+QfIhf3D+wsSqsLYfNWqU57IlvE9w= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=virtuozzo.com; From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, armbru@redhat.com, jsnow@redhat.com, eblake@redhat.com, vsementsov@virtuozzo.com, peter.maydell@linaro.org Subject: [PULL 1/3] docs/block-replication: use blockdev-backup Date: Tue, 9 Nov 2021 18:52:23 +0100 Message-Id: <20211109175225.2209903-2-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211109175225.2209903-1-vsementsov@virtuozzo.com> References: <20211109175225.2209903-1-vsementsov@virtuozzo.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: AM6P194CA0059.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:84::36) To AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fd68459c-b782-497e-ffd5-08d9a3a9b814 X-MS-TrafficTypeDiagnostic: AM6PR08MB5077: 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: nSmWNB85qJediW7T0uxJw9o7/ofA3wo4aj7ewBtm/aXenh2w7o4tMfa0Xhh9A/xFUoF1SnNH0Qndysm7xX6OykPp7HmX/QLexyPmoBQfUUJFm/qiaseQaVHvvZrcSFdGes9o5y65dxvGaLD33LfKpq8Cikfiu07Hi5ELU9HNsKPG9hq9KhHmr+w5GZrj8cKdSeM0ECpeyAOxSMe/me4x81Fh/sPUG33cBCPLCIO69cDtbXJxEUr54pTA/D/b62d9eqqBCWZKjfYx4rixnf7VCuWK+Lrv8NS8S5jxvOdFOecPtWWwTx+X2sQrXSrcImIcNU8iVPOBq9UJouepR1r0t9GglUpFSCKLEHro1cYJti+rbNSV2/QxXXpKKkkjgsrFBE9jqgLhY17FwgWoLaVqhYNgtT78dyM9hh0NY0MCIWObTUZ+4tTSN1v+JrWzQdJY/9x01g2RxlYB3jmhJz2VuuQvWsMdtgGSSPSlK9OL8OvR4IKmNQNyaZfhVF4NKs1GQA1T6c+OxHiKuC6SN5pEYjVpnPtBJn52LVLuxZ5t8nsDEGfW6Wqb0+i4Ub2cDSLRiA+G0iKVtY6RLu0HtweHfFNAsL/Wm0O3y9xVcZOpwd3e+R9tWGEELAIsjw5vB5PLYHPnMsZGSX0l43I/Eyq3JzV64zrKAT0g0RkeRpNnxZNZUDZJlmrhTNgXJqdtEKNONRc0jL4m+GZSul9epe8psg== 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)(8936002)(508600001)(2616005)(1076003)(956004)(6916009)(83380400001)(52116002)(8676002)(4326008)(6486002)(5660300002)(36756003)(6512007)(6666004)(38100700002)(38350700002)(66556008)(2906002)(26005)(6506007)(186003)(66946007)(66476007)(86362001)(316002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?f+o0A5o6qe9EmqtAKyUXS1JtLxu0q/Zkkk9QjIjqrdDfDJUzSzDeqk8wAFcl?= =?us-ascii?Q?o040Hd4Mvpfho6V7eNUvZEaGgTrFXqqtJejG+wmMw68zgDWBkTbcACgFMI9U?= =?us-ascii?Q?edYZO9yYOXxRVVaZNLg8wxACTzg1P4l4MpU4jqlNLYFCkNXjg8KXgKiYP9bi?= =?us-ascii?Q?2/gIqZUiHbN2X72PrxQ88mdVeBS1cQ2xdTi3QDs1RYhyq0CxPtaudmXbJgHy?= =?us-ascii?Q?Dq3l+avFC6jORJqQH13PX9/zG4psWwEXCu7QuYX7eJoXTQ0YMf07V93Gn7hD?= =?us-ascii?Q?0O2i+bkGKaI0ciXcXpqSU6FnfRtaYI2W60e+tcAV4vSquAzViT0Rtoyt0nKV?= =?us-ascii?Q?CPEp+xi6kQNW7gLaaH6tuCIwnvY9c5xVqRc7Aawqeg8W/HXaBsXEGuEWpjHH?= =?us-ascii?Q?cGwVO0gREKrqjYrz1HeIn+ul01+Z6Elx1AHIR9UEkFjsoYnFrfZva0gnyedp?= =?us-ascii?Q?H4sppqXqkQQ1R7oPagKLgTkzoT3Nr5cI6Aow8TGco7zxQ6HAQR0KbEfxjPTQ?= =?us-ascii?Q?9/DWrGGYafiMj1BNJFZ2J1X3bLveofnd+3B14cgZ6AzCvNC6NgBOMNOht4Wh?= =?us-ascii?Q?MrmC0CPmcSLcmbnrsRf1luzfe524GioD0LN/KCN19flqKbZkRwamOJlXVjD/?= =?us-ascii?Q?yoL0ZY8WCOfYULb9wMeqtp2/q7f+PEoeIGrtWdjIihKTOSa8TbaNDe6if6dH?= =?us-ascii?Q?/nTcTrOiAszuZjunWjQzt2MTvNaZPc29dRelGXLXiPQfu/EnBgCCDoviXjV7?= =?us-ascii?Q?TCR+n3ijsIFWy0RDgczHMpJOBaK47HvS+mghIP+ZT4PEjLT4/EQg4BufZE6g?= =?us-ascii?Q?9SWwggEkC0YeNhZxZfPdu7zhEJ98+lQY69qjzMYaDDKtf8OLjDBP/q4l11oB?= =?us-ascii?Q?wJY1FtNzjq5/DTODDCXJDNHoSvQTuUOfU+BYNu97S8uPZ4B9Up2nAVYG/HGz?= =?us-ascii?Q?6yGln5twwWmycB+7tPlobKNxRXkbxQQI36NBrg0rGOwomQUSG6XCvxbZgNLX?= =?us-ascii?Q?htrStE7FFss+bOR4WwSRDw2tsitsY84w8OO5P41nqzFt5Gb4m2K+/KHT6A/b?= =?us-ascii?Q?G243E5lkzCfUtFUxDQezc+Y6QNe8saD2iCCbc0nosRTWM+1deHh55PTOHrdz?= =?us-ascii?Q?754S4tFuzblP96tkjziyAVfUYkaY+EE/NfYaIVqRwM8v4UfcRGeIWgwiJrIW?= =?us-ascii?Q?obbx3kzd9WS4jtf7gyQtqKMhbri52ymTkGmBtUwJ84XylUtkj18u4/oZZ+Al?= =?us-ascii?Q?YZuJrvYUmHsylsgxP1JMo/RjnUxUvP9k3QaJ1ObULXLY7OqGhgkQGnvt34mR?= =?us-ascii?Q?6VFGWgskQC02HHwderAmrKlNqZSZWTjOEhz+JPxsZtiPcRo3djZOvGUJbpWp?= =?us-ascii?Q?ybhH8gHWt4O8TRvG1GfflXTlq1lPAcmC3hLV1FBLJg50WOaXgmcdVY819S7D?= =?us-ascii?Q?MP/2sjI+0ObK80YPzjnODw8xXNqbABVFOicKLMbSrXdlEiVvvb7bslrVF60v?= =?us-ascii?Q?84oZ+CeU2aSc+qPPxqI2Sj2NPXCsEJHyaTGzrEF5ws8rTLpYeZTX17ERj6oC?= =?us-ascii?Q?Y7tEu8E7NIWfp08Ku8ohlOtmWWGzEXC2IEp9Yu8GWuTPwO1BJsAKbhpN/kkq?= =?us-ascii?Q?vOf+x+7ev7XMr/SRhKkP4hB2oyxz1T0fvewR3kgaXzRyDD2uzMT/e69ObE4X?= =?us-ascii?Q?rfu9fA=3D=3D?= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: fd68459c-b782-497e-ffd5-08d9a3a9b814 X-MS-Exchange-CrossTenant-AuthSource: AM7PR08MB5494.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Nov 2021 17:52:38.3925 (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: q4FX97DeAb7jZuOspNPJAjEttUjJ7Yw6ZRRU2bS/z8ia7SLQAdIO1r3lPgLHBoUxY89hVo3FrSsb0wJaBv2oYkSnbguaDbR4lHhJiHyDeH0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB5077 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=40.107.15.138; envelope-from=vsementsov@virtuozzo.com; helo=EUR01-DB5-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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @virtuozzo.com) X-ZM-MESSAGEID: 1636481373860100001 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.31.1 From nobody Mon Feb 9 12:30:04 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=virtuozzo.com); dmarc=pass(p=quarantine dis=none) header.from=virtuozzo.com ARC-Seal: i=2; a=rsa-sha256; t=1636480470; cv=pass; d=zohomail.com; s=zohoarc; b=jbgklubAMExebfTi+XYHinfLhjNiiK6rP1VBpOlRQiSGBoLSTSaF7ec2XZNQHDiU38e8b9GUKeRcWz8crIgvARtHGiuBSMfCEqvBseoZbaLd+m5GhIZTwrQf0oXl3vk8ri9AjxkpLzeXNUyRHhMNsYomXGHVARJsrn1CaFtHJtQ= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1636480470; 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=fjhADTVAUoDLhCzfU++FG7KITNukarM7S6d27exKUFw=; b=Bemn4C6M8jmap80g0ooRKWLLA2j5b1obXkVe25bgwm15Evn+EucgqlvSvROhdvwAar3fVZVmyoNXpnCj491S6A7C+tTZTEPViXpwKQdrhYVp7LwwWTqoJLWtpmG+R/hZWMoGWDyXZodBg481nY0uegb9KMDmb1Ygyu/x5TDwFZQ= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=virtuozzo.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1636480470076138.34652926263414; Tue, 9 Nov 2021 09:54:30 -0800 (PST) Received: from localhost ([::1]:50358 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mkVKF-0005tg-Nk for importer@patchew.org; Tue, 09 Nov 2021 12:54:28 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44494) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mkVId-0004PZ-Oy; Tue, 09 Nov 2021 12:52:48 -0500 Received: from mail-eopbgr130133.outbound.protection.outlook.com ([40.107.13.133]:13792 helo=EUR01-HE1-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 1mkVIa-00016j-8N; Tue, 09 Nov 2021 12:52:47 -0500 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) by AS8PR08MB6568.eurprd08.prod.outlook.com (2603:10a6:20b:338::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.15; Tue, 9 Nov 2021 17:52: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.4669.016; Tue, 9 Nov 2021 17:52:38 +0000 Received: from kvm.ch-qa.sw.ru (130.117.225.5) by AM6P194CA0059.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:84::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.11 via Frontend Transport; Tue, 9 Nov 2021 17:52:38 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kOGK7pHldAtHtHz9/LK0G/yUNee1Z1zTcUkuuYXk1bope+2yxg+N0u/dHzOA0JzCIMPE/j04O/YZcwurzEdcJ6IbkOp+sCCgzAXr8X12gTTC8eev+kdITIJR3v7yXG+2752QVHsitZdkTGsvnH6wcA9eqfvFuiQdTX1ezv1xnt71XPncdBLRl0cLlKf0Iecg9dmNVhzTJYkU6o/zdBJXCitSXA0RcgTdE+Wd1eAhAg6m2Weki0/lDtIJ4rX0zn3vFPkQxRtzHXa+mhSGo0k9P0MTlqa+OoxliRDeukpn89Kv7VonaYBmTaY/WXcT6kxPrFenm3kfRHSmjUmpCFMf7A== 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=XOEUxxezG0W9fWVS4ThHvHxXw0aP+yvLUFyhji58rMprvFj1FSBoT8AMH4ZlrKMl2B0RrKwDRNtKItudgJlu8EmdXQenQJGCbUYGE0lI2hxvuWPJiNiuP+kP5LEr1vFMw4Npyr6b5nnhzvhckrNkgRnKyHwpLpnvUmKVdFoycGQ8ncEmnFGdPA9AtmYkV7Ud3Ctybt77lTTVr7ui/h2Y9llSjCOFfvLW6u+1R+GNvBgLIoGuENmWJogZy1jLArGf6l/RNl3JhZTpR+Zi1Y8/NTaYeS6rhZqS1/n3Sjer1jyv2zpKKM7vmxspZDjGDsB4y3Srf6bbO+nTOPOJ2tLbzA== 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=FA7l/sdSnx2/erE+gfztM2etqS1Jtf70zIjd3lpPL2U3KTZemJkk4/IhrU8hHSpqMce1k8c+WIQVN8MOhgJ+of4I/aGVTwrVYra+l0gmYySTIgCiw7Q+HUAH+8YPnbHGhgX9OIaP2lKZpIjsmhHSmI9P4zimUsmBfVr8bqEOaRc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=virtuozzo.com; From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, armbru@redhat.com, jsnow@redhat.com, eblake@redhat.com, vsementsov@virtuozzo.com, peter.maydell@linaro.org, Kashyap Chamarthy Subject: [PULL 2/3] docs/interop/bitmaps: use blockdev-backup Date: Tue, 9 Nov 2021 18:52:24 +0100 Message-Id: <20211109175225.2209903-3-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211109175225.2209903-1-vsementsov@virtuozzo.com> References: <20211109175225.2209903-1-vsementsov@virtuozzo.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: AM6P194CA0059.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:84::36) To AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3f3b28f2-12eb-445a-db33-08d9a3a9b850 X-MS-TrafficTypeDiagnostic: AS8PR08MB6568: 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: Xuwtx1XIRyoTnQD8izQtps/g/IRiZ89iguRPskWEkbt3y3JwtHT0XnfCp/8FdBlrXAXiqYeLOhnu1zyyk/lL3io/Yu3FCg+trUZkKtEVKgnDidXvpFLebQ6UWOkYfqu82lCJEPVZF88c/wQDjHHQ2GXGylEvrhNCdqqMe6B8PrWnbZtJd/YwiBxoHkKjlB3RHPxntHgRcUMAZ/NaVDsRJ7udQmS5T3Kv7mVbsimKh8dBbhjCOxrj5wf2qC21jV9IyKSd+oAeBkdqu0sKvpzT9eKAcqKR52l+x92Lcj8A2t9NItc3sXuqK/mkdWPnQGriRgKf64Nh5ayaOmJ8vqr2MNtNoyqLn1ok3JrSL0KJg/2pJg4R3ez6J02TjLlaZ+YfVp9QWKobMLFpwJjHK/RJmazV9TY361ITi8scHhymGr9QXv+bTmLjlflkaPWAvejlAHeJG4R83yLDGa+VyjVRc3tHCZeWWP859JEF4SA6uxeUnIE8Iacf3bBYfGf5SWR8l7AKw7mQGMN9BEOgnvKY8ClLexoyks2DnwreblOImORS5MQICt9Yug1BJZjjqtxJPSEMSdauvP94DhCROP9v4TbYg37cX76fibtEyfjAX0315cf4xe9O6noK1dbCBVtOi12ERR5y/JyCcklUBYaShRccaOcMZ+LoB3QZjSbsQSqzvTQk7agz+PBBh8tjF0qgiMwItixmzbL9IF0+ZDAKfg== 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)(4326008)(2616005)(8936002)(6506007)(6916009)(186003)(5660300002)(316002)(6512007)(38100700002)(86362001)(52116002)(2906002)(6666004)(66556008)(956004)(508600001)(26005)(6486002)(1076003)(66476007)(38350700002)(83380400001)(8676002)(30864003)(66946007)(36756003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?RAwRfh41UrPAiqwdHnYGIXM9HR5Qfy4oi45S5tUpdMbLOv0yXNCRkv3r23/I?= =?us-ascii?Q?9NTs7dVyvwomfnm1kLkmPMVv+vdYzE4kr1RSi36hwVPgfxZKS90I3OGqtepE?= =?us-ascii?Q?ps/2aLNxw6qi2dKsVAMQqNHmPLpGIOc5XeSWaFhaFrej+R6e4lGmS1W3NJQK?= =?us-ascii?Q?MBZG7tlhYDE1QeJc4r4zBMpHt2tF2P2KnkPuJAKCxtjVJnJEd1nRHypJ4D16?= =?us-ascii?Q?V+yi02d1MJWiaDNtiShqZWDLXxSDyRBPX+tkm3bLcPtdVe8A/B04SLwIERII?= =?us-ascii?Q?tfVtSG35LJh9hPmHGo9s3y6EHAEPniarRyMR0hVshSE7pc96jpEGGu1CRhwq?= =?us-ascii?Q?9kibCtImXcvycnNmRsnMSLCGRXAIAkSBuPvkzQzdDnYvlMwDZMJuINDRnXGl?= =?us-ascii?Q?z7u4sW9xe8aYcbTL0HFpJYevbA60cGFPDJHpEpUo7Go1aJIpfa5V7yn83Ll5?= =?us-ascii?Q?YJGDw+6D6CZTQ6o4wYHRD9wLc0E/p3Oq+4xGrNJC+03NvBtpqyG8d/SZ80wu?= =?us-ascii?Q?2bOfWl5XlZ3xHwX2gmEnD7U8R4ahm9hGVVI2m9vguRzBguj3cLNFXbYJ1ETL?= =?us-ascii?Q?5b2m7QTsJmNQbDw2RoAuXPpHs/4y29PfSm3qgVq7/6ViR+2X5pgUCMwX8TaQ?= =?us-ascii?Q?5ri/ZXaD2lEwAbR0/na/lNY0hef/GZkUSFScVWRaeDMUbVWfBZ3eD8xKaO3v?= =?us-ascii?Q?64ef+1U7xlYvCRpU4qwHeZpGm3fGaRxyw3MFI/6coo/inraELHTjnZV/Ev3y?= =?us-ascii?Q?iGqju36jIdTdaAv44cQOcGXXvrAB5dqhCMoP+u//Os7cTWqvBvIgghK3VhSa?= =?us-ascii?Q?7MglifSVHuZ8xadFffYVhyFzYsn51rfh0dTrL21ZFQYVj8k3JEpY7QZzsasC?= =?us-ascii?Q?LAt0s77MC4uSJrkdW6Wx8BVgfjRT0tr1AaqMnasFQhBLwHvAdOHQTyC/Z9DB?= =?us-ascii?Q?6+N78+BC+NfcGy4NjTZ92/n5PZUBFOeI62xvhMaTyMWliyPArI2EBzaiSAKa?= =?us-ascii?Q?I+TGLRmy53ykhAs1PK1IE2U0D/2HjHl8P+cWE/QFSqd8sAFBiHL7L5LRNzbI?= =?us-ascii?Q?Iz5fZqz5T2KTOwY0EvGJcXVhZ4TIMF2F0MFMmS1KQUvOa4LWdxMVCT7ArNUU?= =?us-ascii?Q?BmzmVV66UNTXy7I9gMnM2RI7g7FQAkhVpy1p4Zmj7XlekSAQdxeRk+SmtdYr?= =?us-ascii?Q?ymbRU1ZALUPGxjppbXd2n2Qn7qFXCWGj4zjOvVHmAH3VzO4LOR0OxUAw+iuU?= =?us-ascii?Q?6TeWctluRIT/4WDKTiCfx/CG7Xrzucn/hXNGhIcO5aMcMIeDYNcs7kHhORq1?= =?us-ascii?Q?gvP/IJOTwvgiWo+YZP5prctxIHvikk1FrQ640mpLHJhjkMMcr3nRqLYTQlnQ?= =?us-ascii?Q?PRufS4F7306F5fIDM1o7R+CCv8nKojEOhBd8JZHq5KrLy/dTiG0qub4cnZ/q?= =?us-ascii?Q?qbbYWjhrXJOyhvY5I5oNYd3hIFGW6IdDmkKduWzI5e2cg4wOqLDBgqt6lwc/?= =?us-ascii?Q?/8QODvVKeDx+6Ov8CemWxys8bDP7je2r6sYiKkNSecDtolvTCQYxsbDmAy7y?= =?us-ascii?Q?8yfe7wNXrv5R6mwoNHA+Ie6dM10m0UAZ3We+4E/Pl2sM+qq1gp3mFtoPsIW+?= =?us-ascii?Q?LZvvjjkFC2mmqXGYFPVmoSDymRNgLvLjKSyCAyRH/fWXy87ezim6W4pTicD6?= =?us-ascii?Q?w2p8/A=3D=3D?= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3f3b28f2-12eb-445a-db33-08d9a3a9b850 X-MS-Exchange-CrossTenant-AuthSource: AM7PR08MB5494.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Nov 2021 17:52:38.8067 (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: 5vWBh7eq14XAaI8w7WnOAwAjX0LL5VUQSjDnqYMMRgsXsIgAKKMsEIpRxlRG60ESZlPw3WGDJuaI5LViytZm0QmiZHP0WkMv93/E84WOID8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6568 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=40.107.13.133; envelope-from=vsementsov@virtuozzo.com; helo=EUR01-HE1-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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @virtuozzo.com) X-ZM-MESSAGEID: 1636480471551100001 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. 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 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 background 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 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 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.31.1 From nobody Mon Feb 9 12:30:04 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=virtuozzo.com); dmarc=pass(p=quarantine dis=none) header.from=virtuozzo.com ARC-Seal: i=2; a=rsa-sha256; t=1636480486; cv=pass; d=zohomail.com; s=zohoarc; b=UU1Simq/Gk9oi0Xf6ujMvJsu02VF8HTNCMVHIgrTZ8YM8mdjEFseSaI5qAQN7GmUoKabXZ3e8Pzqtfdcur0L+EtOs0qGdmP+tZ6jhVJsSpSQQIXxfB1qHPOnMlffzoML5f/SfLytT6dZlMIbOn6tYlIwP7BGYGVI8ts/C9u5FLk= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1636480486; 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=7TaPc6DZMMXIJC1GN1SeWRaY9Yy8BhIhm+2MGW8lKG8=; b=abxCOobraVyt8kQo24vZo8xQ73AQUc+t3tj1W7ZBStPHJNP+tsYeuwBHxYrfLi9o8smkxDwiXVbbJeJrBRhfZDM74FpqxqPqDkj70QN3PwqYoNc6XGpp2y8MtuREus3j+og+brWv8k5hNNd3n6benOOvtu9UsQcA5z8PM6fGkXA= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=virtuozzo.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1636480486364237.4874083915389; Tue, 9 Nov 2021 09:54:46 -0800 (PST) Received: from localhost ([::1]:50768 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mkVKX-0006AM-6w for importer@patchew.org; Tue, 09 Nov 2021 12:54:45 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44510) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mkVIg-0004Pm-HU; Tue, 09 Nov 2021 12:52:50 -0500 Received: from mail-eopbgr130133.outbound.protection.outlook.com ([40.107.13.133]:13792 helo=EUR01-HE1-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 1mkVIe-00016j-27; Tue, 09 Nov 2021 12:52:50 -0500 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) by AS8PR08MB6568.eurprd08.prod.outlook.com (2603:10a6:20b:338::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.15; Tue, 9 Nov 2021 17:52: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.4669.016; Tue, 9 Nov 2021 17:52:39 +0000 Received: from kvm.ch-qa.sw.ru (130.117.225.5) by AM6P194CA0059.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:84::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.11 via Frontend Transport; Tue, 9 Nov 2021 17:52:38 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=J3Y1D2kJ+LEFeuZe5FBkadQ/hnEUve2jjkMUjaBM3yRBkKVArNZZ9AuWKq1K2Zx0u6x/RvcYlNdotr5d1LqUoy79gektED8/f/2LtU8ofOPacjIbHTwdxCB/zeszTe8pJq8w8OQs1IFWCL8D8lHt3ALJytMSWinZl0y6Mi5YPD0Zpte0IOU41MRhlAZ3CK5ZRALqjS4YWDKrktOOU485HCN1Cpkgaur87AZ8SFbqXRBtJVtdWPLSGPa33q18XhPTrkOYeRUjf8lhy9MQBrJ07CwnfPRKM83w2OXOZl+s5sM/Nl0cVQzGHmC4wsrEreAvv9YwtGauy9ltlNMLLWaEQA== 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=7TaPc6DZMMXIJC1GN1SeWRaY9Yy8BhIhm+2MGW8lKG8=; b=kNCBkOrVhW0MSIw3oQrqFPq99e3BbCy+BovaiyBZUN1eeke2ZgF0c89wUoNGyiwQmzGIhg8GN8BAMK+5G33dxuWBeG1TDGejHt6vHYk7weqYO5Ttz486YfY6buswAE+7CRyg7wiED1JcGE7nUSm7oiE8MIcXMmqfgnS0393NmMwD++u0XJ5DlDXcp0Q2P+zGZtPPml5lCV4I0ad5urugOzVp2ucSQiMHk0N944e/saR2BgD+FjuiB+Mm+BbMAExE5m4J8pd7o26uZOW/Rhm5gLK6HJnoMwcYRhy/uR5cDrrsFkD5k0HBq40qaKfbUkiKfwhWJ72zznBboXuACZxwBA== 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=7TaPc6DZMMXIJC1GN1SeWRaY9Yy8BhIhm+2MGW8lKG8=; b=aR3Nx1T2Ab3/0eRPwoOSzZeCKr5fEvOMyFR7WeqSwpPc0zt1cEvByQpMxY4N48AlmEONW/E1WsidNUXEgbpiadDsVVxdUTEG7HVaMHgJ8mkpczAjD/dK9M191y6v2QO85/OTmnEa5y/qdBUJIVySCixM/a5b8dSIlx1KaqPWEWQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=virtuozzo.com; From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, armbru@redhat.com, jsnow@redhat.com, eblake@redhat.com, vsementsov@virtuozzo.com, peter.maydell@linaro.org Subject: [PULL 3/3] qapi: deprecate drive-backup Date: Tue, 9 Nov 2021 18:52:25 +0100 Message-Id: <20211109175225.2209903-4-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211109175225.2209903-1-vsementsov@virtuozzo.com> References: <20211109175225.2209903-1-vsementsov@virtuozzo.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: AM6P194CA0059.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:84::36) To AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 12b3f5af-12bc-4bda-3803-08d9a3a9b889 X-MS-TrafficTypeDiagnostic: AS8PR08MB6568: 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: vOvSBEEnI7yxxPoADKvuW3LoDyyyD2PwOvJquhcexySTwDuN6sXFT4qYJWE6SE69THSm7BbSvwXQHdhIHChLaXjDXmCw4A7eI+q+9G4DhiO0eBK0caKmz+vbPE6J8gkn6r2w77MxuYubQ9HwKFJJfk0dVexc82UH5t50y4xMti8eewBqNbzCh0RmHyMrRLtZOoqezzoh3rY2DMNOgcap+GMN4JCpkLX0XMhATPYDmgYD9YZSItZnsjdLV+SHSvQHbJ/SQ17Zny3e9dpShSCO89DdCfvr1/kNK5KRuU/5MWrZsBhwObAiCou4jVk+KQMhwl4w95YeyG9DdUs4QSN2N9v5ldkrpmqTjxRYyk86B+Prr5ZyCXH2spte06Gz+WKKjVSq+4Oq2A9vYzMB/ABYwZ87oB/xFG14m8bBQJlzWWjNr1Zg3YG0X3W+WeyIayuLBHW6O0lD6aGQwh07P01wbBrM3EwXhkz2dqh6PVttEJ/ri0XlKNdkMdNx51aUnhd3mw9/eaIBw2uMU3oY+i3HHu2f5ukncyOwcRblPT2f/MZmAoQV2OnUs2EZq9gqurs1CH3eycKybmtmfiXl8Aexb2LkYNjIjA5IupVLvq0iAntbCNy1+j0t2ibq7G59/a0ChKumOtK+0FTtPhEs1ZfkCV9VqLttN/8sJe138uNZp4NdIo1P4SOpKHybYBUCjVgJAQjBVyAqRM4sjn3aErN7LA== 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)(4326008)(2616005)(8936002)(6506007)(6916009)(186003)(5660300002)(316002)(6512007)(38100700002)(86362001)(52116002)(2906002)(6666004)(66556008)(956004)(508600001)(26005)(6486002)(1076003)(66476007)(38350700002)(83380400001)(8676002)(66946007)(36756003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?XKdtQ6glWiLROyoKzC7LRXFbhVJHEPDMtTHUwYyCANguPtD+4uSPzoRnDFH6?= =?us-ascii?Q?XWmqKUvAYuy5uo+Np+99CPzQiw+GZ9anKG7+Qs5E65+aiZAwQ62x0D0WJA55?= =?us-ascii?Q?HiZZb9MWXcvmMKZn0O93INKKbrjQ39kMUh+meFmTGkCygnumSR/fm//w/KHy?= =?us-ascii?Q?daBCH3i6l7aCznCSI6A3N+JpN5BGLz+XW2m0pn1ZULiA7siO1L2dQAtborYD?= =?us-ascii?Q?6vvCJetW8mCIjoZxU9FAXC9Oa234D2YHVL2y8KWEcT3BpFsd37xkq9+7ydiU?= =?us-ascii?Q?PcQaOlMAmPxayZuI0sXfTsHwCD737BToB4H+lwv4wOBKjHSpzFCOzTJHCBmz?= =?us-ascii?Q?tvG8ut1/FsnFKE7Bycu8YMXK5ujEtQjxX4W+IZqf2PUuf3fikXKynORl21an?= =?us-ascii?Q?ygEPw+5eLjzk4a9pmjFNWolL5MQwJjjhZzQrSZF9okD8Hz/ZRYgaoRr0KW5r?= =?us-ascii?Q?mtD3VhImTuMQz3rYH3nrqDDdAb6iuXjX6B0aVBqbC/9e6D+FfsU8xk7bH2v5?= =?us-ascii?Q?qOE0tIOXiyFePo8hrFyVSwNYi4vMI7Lmvo4PiIlCTdP0yCi3vfNRYjDwXbrM?= =?us-ascii?Q?dVigLGwNpZ4Cb/5qCf1zer/3QfDNPkMcFlZi8Rq3Yl7zV3ukSRcMvzgx6qAp?= =?us-ascii?Q?QhmUtWW7FEe57WxsIRKprofW3Dr7R7AoAB7CHGmjY7C7aBZeFF/Ou4Jdpf/G?= =?us-ascii?Q?KAUpX955nihjkaZw5KrK6tnYt813sV6aijUuW8dRgZbp4bRreEdArOEiJ7u5?= =?us-ascii?Q?Eio+EDJb1arlh96dc/pNHBTa30I0DRqbmXpUAuypFFrA7wBOAtlZ2qeX24jw?= =?us-ascii?Q?1HWe19FdkCzI0za4h6HSGNSc49yb0/8tz5HPc0sbzyRg2JDfHUseilf1eSF/?= =?us-ascii?Q?O97UvwRKLj4Ga2BuDif2HVSO+9LchWA98SQ9oBMyFn8oGuI99GpdbCYbsQdB?= =?us-ascii?Q?w1h8pInQrzVMoxcMk+VDf3zTATGVEoXrh/nloUgYj1M7PVoM0Ne6yvUzA9LQ?= =?us-ascii?Q?zx70bi0fMu0PrCanRg9qXA+zFn0lY28a/wIRLdD7uNlVrNwaA2y22sxze3z5?= =?us-ascii?Q?rNTa3ucQ6S67r18dPWfKF4fiTXUBfO73xNRWdyuIjtqNIL3A60GzGn7Lw73m?= =?us-ascii?Q?FP+X6H1g/FZ/Qi7BEuLG7NTFxfohYfI5SwHJGl44ktlgngUlTc6wwTYijM5C?= =?us-ascii?Q?trVeAIh8wh8SnWQCZFnkZKjgKuJ+93NWR94pLzPZfs1JufJPsGN64+guZ55I?= =?us-ascii?Q?pU2DG66hRw8YPHIA7bQYx81EEh5xLlM9TEWdFzK/B0ff8QaiF39JpCR5eQA7?= =?us-ascii?Q?ee9qKlFy0ZhzNxTCmjIZHXvxP8+ahYdxy5X8R4UcRUW17+7DXWeJNaZJocm/?= =?us-ascii?Q?9U7GR6pbe/hjfvuE9geu5V78LTj3TlaBsRwpGqWe1fABHoa6o1teoVO5eFtT?= =?us-ascii?Q?u/nJ1D7qPWT8tPDaiIksiZ49Fxbj0uPVWOJhkc7LVjb3/0LVGDiXmZXPzj5A?= =?us-ascii?Q?B5JVX7dS50/za5FRyFhUSn6qNoZ6pOiNhJ/n0GyXNnbesjQLkJcww7mBBBOK?= =?us-ascii?Q?rHc7MoCsxihR9fT3wDRP+q3tS7WlUVXauerwFH/c5vdJn4wjSJ9lfQmq38OX?= =?us-ascii?Q?xeQSDDoLYbOkAjqJ3CmDZYCsQx64ktra2Da0P0sogtU5K81Up6ONH98kUMFH?= =?us-ascii?Q?P3gxAw=3D=3D?= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 12b3f5af-12bc-4bda-3803-08d9a3a9b889 X-MS-Exchange-CrossTenant-AuthSource: AM7PR08MB5494.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Nov 2021 17:52:39.1601 (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: D4o7LVNgr/xOjTMMWrA3lXPVj42dk1e3FPs0Z3KA9r9uclUta8zIZNJuk0PZP09vQJB8/bp90g/W9caTEbGW9Pu17dBeedEH4ijhscMaxrY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6568 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=40.107.13.133; envelope-from=vsementsov@virtuozzo.com; helo=EUR01-HE1-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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @virtuozzo.com) X-ZM-MESSAGEID: 1636480487053100001 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 Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- docs/about/deprecated.rst | 11 ++++++ docs/interop/live-block-operations.rst | 47 +++++++++++++++++--------- qapi/block-core.json | 5 ++- qapi/transaction.json | 6 +++- 4 files changed, 51 insertions(+), 18 deletions(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index 5e514fb443..600031210d 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -239,6 +239,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. =20 +``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 ------------------- =20 diff --git a/docs/interop/live-block-operations.rst b/docs/interop/live-blo= ck-operations.rst index 814c29bbe1..39e62c9915 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 the deprecated ``drive-backup``): + Point-in-time (live) copy of a block device to a destination. =20 =20 .. _`Interacting with a QEMU instance`: @@ -555,13 +555,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 @@ -928,19 +929,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 the deprecated``drive-backup`` +--------------------------------------------------------------------------- =20 -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. =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.2 and +will be removed in future. + Yet again, starting afresh with our example disk image chain:: =20 [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. =20 =20 +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`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ =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`` command 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/qapi/block-core.json b/qapi/block-core.json index 33e8507d10..1d3dd9cb48 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'] } =20 ## # @blockdev-backup: diff --git a/qapi/transaction.json b/qapi/transaction.json index d175b5f863..381a2df782 100644 --- a/qapi/transaction.json +++ b/qapi/transaction.json @@ -54,6 +54,10 @@ # @blockdev-snapshot-sync: since 1.1 # @drive-backup: Since 1.6 # +# Features: +# @deprecated: Member @drive-backup is deprecated. Use member +# @blockdev-backup instead. +# # Since: 1.1 ## { 'enum': 'TransactionActionKind', @@ -62,7 +66,7 @@ 'block-dirty-bitmap-disable', 'block-dirty-bitmap-merge', 'blockdev-backup', 'blockdev-snapshot', 'blockdev-snapshot-internal-sync', 'blockdev-snapshot-sync', - 'drive-backup' ] } + { 'name': 'drive-backup', 'features': [ 'deprecated' ] } ] } =20 ## # @AbortWrapper: --=20 2.31.1