From patchwork Wed May 5 13:58:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Sementsov-Ogievskiy X-Patchwork-Id: 1474334 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=virtuozzo.com header.i=@virtuozzo.com header.a=rsa-sha256 header.s=selector2 header.b=hYplZvWQ; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FZyxs6TNcz9sVb for ; Wed, 5 May 2021 23:59:29 +1000 (AEST) Received: from localhost ([::1]:37142 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1leI3j-00037I-Tm for incoming@patchwork.ozlabs.org; Wed, 05 May 2021 09:59:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37700) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1leI3I-0002v6-6i; Wed, 05 May 2021 09:59:00 -0400 Received: from mail-eopbgr60134.outbound.protection.outlook.com ([40.107.6.134]:4891 helo=EUR04-DB3-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 1leI3G-0005lY-CE; Wed, 05 May 2021 09:58:59 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FmmG+f1tMFQBQwT5JKUXyGoPI9CGBDu8q8TGOISVtbkV+QWfZrc1h+pySdDdVY7gGpSgtghFijEdjeZl7icDuwvXDANp3YqnLXcFX39fgWAmREKR9Itk6nD+Aurpo14jDYLMrmsdJ6zVuWKoL4glTrEW4CzWamkMGrmDKD6pgvjMVZyohc4B4ad8xr6bsBTUjU5cKtfVr+1X/FFrdnXHpWMYZA202hXqLZ2HY5sRL0zKKrpIWabSQUqq7bkie91JEDCquqsMlLnQnPfQ2njhEONeeZldnzF5kKm6zKz6LLau8wwZXjv2eVbV+Q8T+z7mxrlRySmQDcV8/zs8RPGBoA== 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-SenderADCheck; bh=cf/gKI8A7e3AgnRc6byagRGRWcWvYjlZnrE7Uyq5v8E=; b=F6xU9Styh4ab1bhSdS08HlAaJ6W/eHQE9c2UrlYny5p7zIVU4ji0RtfFDsbByxWZugZkl7KOTx1dITRXnzkCL2QUH9bsfv8jcwUuQ7ncBwvc5XQrQZUEMhWdoFkmxxKxF417g3j4cmzT/hz7A+42AwMtjAscJA0C7mOMyGaJjTjPxABaPj9TQlBrjyhTyT2hderqpc6xRjDki+JEZNAIZekmzW+69cvjH4ruQszG56rQL9sertYEHw/A5ABKrLIDXWouMQkbs6/1bqZio+ZhyRnvD4ZM25ieQPq6xolJfzq5vp2CIqnDrocnlOWeqLpBrEY5JAbJQvsLctSCQuAR8g== 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=cf/gKI8A7e3AgnRc6byagRGRWcWvYjlZnrE7Uyq5v8E=; b=hYplZvWQl203qB5a2W0/CHo469k7MYyTPwBUpzD+1QtG7MKhB2d8uFep523PEdsNSFM+in2jACjdjEcb0uJUjYAQXgF3xC83FWxo+8ezwKhELkVDeF1HXDgLk2iA5VX4zq2Fz6tTzHGfUMJIwdGiEEnNGpuBSHSkJsArFRUaxCE= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=virtuozzo.com; 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 From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, armbru@redhat.com, libvir-list@redhat.com, jsnow@redhat.com, vsementsov@virtuozzo.com, eblake@redhat.com, xiechanglong.d@gmail.com, wencongyang2@huawei.com, nshirokovskiy@virtuozzo.com, pkrempa@redhat.com, den@openvz.org, yur@virtuozzo.com, dim@virtuozzo.com, berrange@redhat.com, kchamart@redhat.com 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> X-Mailer: git-send-email 2.29.2 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 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-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: rwWVME2aHVz3Q7RlzfecpG2dBKwmIyTSu+PQE2q9a8DaPPF1oerYYUJbyWvud8rOyQXq7gTcWVy7rHLQY+hS03/r3aT7XISxIcmD2bOkWim3z8ynSiAmc4Bo4EPtK0uvznOT04hrdWq2YCF/LLmoln6LCyM/nwlG+GD5pW/Mi8MqZ0f6otvJ5dfBeP7MsiOrftnjTYPu+cC1YFBYK4CEHlIBzAt7SbpgjEDzr38Xhg5EvVNKmdtWgr9XKtGcg5uYPmtpXrfFzYTrUC/GCPTetcYu8pA4NU7qcUwAJOnj6pTLdhQqjYQQU3fU6BudcyqruunkyH0o+uNnGdttLjB4mPbJLAekcwRwx2u1j/6f7n607GklOqQgoJp9fS1bsp7LigSSEY1ccYwgqLX9JIZyh5JFM7hGYKCP11D+/7XxRa/jKWntPCJl0Pj21dEb8p3oqU764CEbk8yPik9c2oCcS9KCQ2trvWGdeiQVoYJQO7JT1WrMBnND4lHY/IScTuCWFkffeWHrvbIcdolnZzRcENkORKV3qJC3iQrJpopUnHNyoPOm0AZRUG8QeN13jqF5IitSKX0L0k53AD3tm6m64zJL07xB85PGV/iAyyrF0eCS/8DJbNGmIpash5qZ9kzw42buh5x0fEvq1iVpeVuDxXELZd73azQC/IBRzuwKajvAtKKbU5ZPPXfJxSJCS98TUUUwzdDuC732yl7mj+BUNUYl09C4JFE8yjSHscMz0c4hpPczT9vlyk1apY1aLqtn3F0TnklxwwUsIDKW1tvL52Of4sfiUr4YGXaGyX8Te3atgbSD3oVH3h/SrHIH3X3369M7l04cJ4uC1iAGofpFckSnzG4m53MGQmd6cNT/aHAEYOrrSNJMs0JmehN7gf9H7lYCTUxH/7/yITORDTsUFpq/FP9v4PxK6yVR+hu8bQAtN3yqdLLeud4FoaRYBJ/aA18C0RRgAn0NFmXz/XP2+gb52BlmSko32yzg2wt6TLXZXnNocosT93DAA8iKlkdLdcvttwTpILo5wYM6QgWfUZgb3fnXc2TtNMla1AjlKvnaiEZ3l/K0tWD7gSC9TEFalhXozsilS4T7qRty86+wGQ5EyoKxUQ+5jZue/SMgFKRj5IIRC8I7K3QrRCBD9/kieQAOIKcy3yoGRZu1KllCByjf0brgXvoJDzoaX3yj5fnz1YicBP3KXBLQ/V09ld9vHiyNC/jnurOZ19pk39WMdeXuITT53lp6tTeQdNsWJXh/fFtbR/cHVmHsEoHcY+4j9dROZxXQ7WiE0OOXFVJ1P/uwOo0kXJe+CG4fnd12A6/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 Received-SPF: pass client-ip=40.107.6.134; envelope-from=vsementsov@virtuozzo.com; helo=EUR04-DB3-obe.outbound.protection.outlook.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" We are going to deprecate drive-backup, so don't mention it here. Moreover, blockdev-backup seems more correct in the context. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow --- docs/block-replication.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/block-replication.txt b/docs/block-replication.txt index 108e9166a8..59eb2b33b3 100644 --- a/docs/block-replication.txt +++ b/docs/block-replication.txt @@ -79,7 +79,7 @@ Primary | || Secondary disk <--------- hidden-disk 5 <--------- || | | || | | || '-------------------------' - || drive-backup sync=none 6 + || blockdev-backup sync=none 6 1) The disk on the primary is represented by a block device with two children, providing replication between a primary disk and the host that @@ -101,7 +101,7 @@ should support bdrv_make_empty() and backing file. that is modified by the primary VM. It should also start as an empty disk, and the driver supports bdrv_make_empty() and backing file. -6) The drive-backup job (sync=none) is run to allow hidden-disk to buffer +6) The blockdev-backup job (sync=none) is run to allow hidden-disk to buffer any state that would otherwise be lost by the speculative write-through of the NBD server into the secondary disk. So before block replication, the primary disk and secondary disk should contain the same data. From patchwork Wed May 5 13:58:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Sementsov-Ogievskiy X-Patchwork-Id: 1474337 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=virtuozzo.com header.i=@virtuozzo.com header.a=rsa-sha256 header.s=selector2 header.b=ZgDL2gF6; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FZz2y2RS1z9sRR for ; Thu, 6 May 2021 00:03:54 +1000 (AEST) Received: from localhost ([::1]:42678 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1leI80-0005bz-08 for incoming@patchwork.ozlabs.org; Wed, 05 May 2021 10:03:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37766) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1leI3L-00031X-RA; Wed, 05 May 2021 09:59:03 -0400 Received: from mail-eopbgr60134.outbound.protection.outlook.com ([40.107.6.134]:4891 helo=EUR04-DB3-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 1leI3I-0005lY-RP; Wed, 05 May 2021 09:59:03 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iZwoFug3O/CzLDv3lhQ052qx5Anx8VDi/w9cVsIUrQ3Cia8z3rW6UPBIhtBwZh84RTGsywAR73MY/crqnkUidiomziW6sx9VDwaK3wtCaVC3/f9TbHoA3wjAGCsKmqWYyGb7FUyFTSmTHGnidAjyYfjHtrJqaHS3fxa6rgwJobc2BVGQrDfMDPLMQ5LkQCdGo++o+b3sTyj+OYxPqP4LOp6DLZhWfPGvIhyG5znq9qycJa80ihsQU/vPx7vv2bz9n9cjxHYVLIlbibsUTTF2OJYTmXGaAUn1QipEpqk+vHJxyySBW4lZGbmVBR2MAdXeGFFZrmPHBBBW5iQXdZEK6g== 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-SenderADCheck; bh=NFQCltJH7MkIdedMj/L2uumEpXtZMo1gMDgSMrWhfGY=; b=PYKSe6wTr7yyx5U4K86+6e3d0CTH7iSHD1xGZAc5d0OW8e9cRguWGb8Nb3vJOhtO1O2Z7zaDQoCu5BGLq6XisXOr/rHhBuWe9uJkm5H98F5f0MFaPgkRg6IMUnRZgyf5yGbbFlD4EvZsmcchLnviZLOSQWSXdo7pMr416h+KOgPo504gZYLLhgwa3tmPJ9orhCh3IE+p45LzVzqFhiTzA3fhw3MkQ8LBH85ljg7+IkeHEvqf0ploocU0XwLbKCuQfKJEgy76vQLM5ZK9KuTkcaJM2rcCA2csV+Cm3z6dR/JeZik9SorDY89xOPwhG2CIsPs/ruE0CUMRY8yHvD9HNg== 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=NFQCltJH7MkIdedMj/L2uumEpXtZMo1gMDgSMrWhfGY=; b=ZgDL2gF6Z0vHlqrR8tBAbZ1k3Ea7V1GSImL5d7JK3yb4kn3GRNn0cfR4lSKEoIAkRXzHzXz5AvbXZIfh0+wEcg++tUsUcQNSlKns6vocKLc11idWWrwxqga8WIDV/cU5bgP+r07XpUZjKmbwQyjLyzbHrQqdWQJFtLwUkUQXzMw= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=virtuozzo.com; 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 From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, armbru@redhat.com, libvir-list@redhat.com, jsnow@redhat.com, vsementsov@virtuozzo.com, eblake@redhat.com, xiechanglong.d@gmail.com, wencongyang2@huawei.com, nshirokovskiy@virtuozzo.com, pkrempa@redhat.com, den@openvz.org, yur@virtuozzo.com, dim@virtuozzo.com, berrange@redhat.com, kchamart@redhat.com 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> X-Mailer: git-send-email 2.29.2 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 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-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: QEotw60fT90NPvmCUOnDwfsbNTlCOId1nZNHhLObMU6EgMpIOl+0tUfHEYQtvywOo1V4nTxVWnFsJAl5muF6WbtdMneSnKW0nboJOH6B85A0UBsme4hCTxpo5DwaQv3hRGvuhH9TZHBPaC4V6pOJ/4cZ91+Kjia5vFSi3RBUUlxcQC0ih3vC0zY1TmobU5p1txxpdJSjMI91gJKraMtxoGW8zlWs1RPEwg5QnDzBhcg3s0l15S7XJ16W7eQsUXzQ+n/gZ1I3cFG/W1JDfhFKUL5ahWqAYk6dxDn2urPFTE+MaGKfXiurPi9GnM0bsR/KPzCPDsmcakU8Yyhs460UtlsO+atkVYt87/+4GJLeYDtsxzzZFhL77AM+uOszo/idxGhk1UcHQrOEOutaAatKPn2CNQaXO5oVckO8cU1roO0XVe+77Y/iSY3NFM9agIJW7NZwgb41jXPm0TvdVgHLHFWxddVhLdJB/JAnIp8RZTMwTypnoC/Qob1BZHI0ykzI5hZ1VNdaIfYqcjExA1FXrXFruoPO4o0KLPbbncC9jkunrnCKsZ5KjYGfgaUWYnFG6wB1FgkExfjkjNDvn+SVOhgdD3Rq8pNfpXEwoiTaDjOvPHE+XGDAfoXIPgAxxhrLWV7CECArmLCInh4TTYlSS4GO4RCEBWS5DmISAmbo0pjflFpKXdEYBSiqoGtWT+KtyBeGcf8q/qkmxRXW7/zj46MERGvYBKxSUlOEYDNJOdpIgpyg4O4CaVRa4gsxur+06kNBd9Ly8/5e749knBwO1M5rC8keHFbC7YQHJ3j8is2WvL1Lnfb2vamv7zGsvX0u/5bqvoAI/qCk9uZUJDzhgOIgP80SkMvLy3YVYhdEM7Hk0VlziJNZtF/EoP4uOBdwOcy5jaCHKEDohvEMpMBUZuOPV89HC+5ugjpE28sIFnQ0sWWd87uoz9H+sPWEQWnRDy1fNY30aN/JZmEMbNJUwnosYN3Vssl/qWQL/Ig89E8KEdc7YjSh2SpFNosWUQ61oEqnx1cVnJQfoJEiX3SMVw/6gVOiW3hRi2mKxp5IdS3nQW++i83oJzIh80m2mx/aahs/5WRnOiJZEeXtlF88qxN69NloYei7r180+QzdgJw1O8RjkrKMJLxXdMGOmOPIUYtdqn7o8ak6UufFaH9r3gJlwQ8O6JpP70e/TGBiYtWIM3PdW3wfwIKzgYd5cno/M9IeldGiz+eVWuVaj3fVL95TPZ9ZUXtGy0RI0lH8qarGNPuWSL+jLTxVoyvnLoyoG17Opu3WI+CvllFSUJuugQlFvRATOOQV+DAOOOToP7L5tk9BVtcfR3ZcIUz75rSd 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 Received-SPF: pass client-ip=40.107.6.134; envelope-from=vsementsov@virtuozzo.com; helo=EUR04-DB3-obe.outbound.protection.outlook.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" We are going to deprecate drive-backup, so use modern interface here. In examples where target image creation is shown, show blockdev-add as well. If target creation omitted, omit blockdev-add as well. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Kashyap Chamarthy --- 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 reconstruct a full backup from the point in time at which the incremental backup was issued. The "Push Model" here references the fact that QEMU is "pushing" the modified -blocks out to a destination. We will be using the `drive-backup -`_ and `blockdev-backup -`_ QMP commands to create both +blocks out to a destination. We will be using the `blockdev-backup +`_ QMP command to create both full and incremental backups. -Both of these commands are jobs, which have their own QMP API for querying and +The command is a job, which has its own QMP API for querying and management documented in `Background jobs `_. @@ -557,6 +556,10 @@ create a new incremental backup chain attached to a drive. This example creates a new, full backup of "drive0" and accompanies it with a new, empty bitmap that records writes from this point in time forward. +The target may be created with help of `blockdev-add +`_ or `blockdev-create +`_ command. + .. note:: Any new writes that happen after this command is issued, even while the backup job runs, will be written locally and not to the backup destination. These writes will be recorded in the bitmap @@ -576,12 +579,11 @@ new, empty bitmap that records writes from this point in time forward. } }, { - "type": "drive-backup", + "type": "blockdev-backup", "data": { "device": "drive0", - "target": "/path/to/drive0.full.qcow2", - "sync": "full", - "format": "qcow2" + "target": "target0", + "sync": "full" } } ] @@ -664,12 +666,11 @@ use a transaction to reset the bitmap while making a new full backup: } }, { - "type": "drive-backup", + "type": "blockdev-backup", "data": { "device": "drive0", - "target": "/path/to/drive0.new_full.qcow2", - "sync": "full", - "format": "qcow2" + "target": "target0", + "sync": "full" } } ] @@ -728,19 +729,35 @@ Example: First Incremental Backup $ qemu-img create -f qcow2 drive0.inc0.qcow2 \ -b drive0.full.qcow2 -F qcow2 +#. Add target block node: + + .. code-block:: QMP + + -> { + "execute": "blockdev-add", + "arguments": { + "node-name": "target0", + "driver": "qcow2", + "file": { + "driver": "file", + "filename": "drive0.inc0.qcow2" + } + } + } + + <- { "return": {} } + #. Issue an incremental backup command: .. code-block:: QMP -> { - "execute": "drive-backup", + "execute": "blockdev-backup", "arguments": { "device": "drive0", "bitmap": "bitmap0", - "target": "drive0.inc0.qcow2", - "format": "qcow2", - "sync": "incremental", - "mode": "existing" + "target": "target0", + "sync": "incremental" } } @@ -785,20 +802,36 @@ Example: Second Incremental Backup $ qemu-img create -f qcow2 drive0.inc1.qcow2 \ -b drive0.inc0.qcow2 -F qcow2 +#. Add target block node: + + .. code-block:: QMP + + -> { + "execute": "blockdev-add", + "arguments": { + "node-name": "target0", + "driver": "qcow2", + "file": { + "driver": "file", + "filename": "drive0.inc1.qcow2" + } + } + } + + <- { "return": {} } + #. Issue a new incremental backup command. The only difference here is that we have changed the target image below. .. code-block:: QMP -> { - "execute": "drive-backup", + "execute": "blockdev-backup", "arguments": { "device": "drive0", "bitmap": "bitmap0", - "target": "drive0.inc1.qcow2", - "format": "qcow2", - "sync": "incremental", - "mode": "existing" + "target": "target0", + "sync": "incremental" } } @@ -866,20 +899,36 @@ image: file for you, but you lose control over format options like compatibility and preallocation presets. +#. Add target block node: + + .. code-block:: QMP + + -> { + "execute": "blockdev-add", + "arguments": { + "node-name": "target0", + "driver": "qcow2", + "file": { + "driver": "file", + "filename": "drive0.inc2.qcow2" + } + } + } + + <- { "return": {} } + #. Issue a new incremental backup command. Apart from the new destination image, there is no difference from the last two examples. .. code-block:: QMP -> { - "execute": "drive-backup", + "execute": "blockdev-backup", "arguments": { "device": "drive0", "bitmap": "bitmap0", - "target": "drive0.inc2.qcow2", - "format": "qcow2", - "sync": "incremental", - "mode": "existing" + "target": "target0", + "sync": "incremental" } } @@ -930,6 +979,38 @@ point in time. $ qemu-img create -f qcow2 drive0.full.qcow2 64G $ qemu-img create -f qcow2 drive1.full.qcow2 64G +#. Add target block nodes: + + .. code-block:: QMP + + -> { + "execute": "blockdev-add", + "arguments": { + "node-name": "target0", + "driver": "qcow2", + "file": { + "driver": "file", + "filename": "drive0.full.qcow2" + } + } + } + + <- { "return": {} } + + -> { + "execute": "blockdev-add", + "arguments": { + "node-name": "target1", + "driver": "qcow2", + "file": { + "driver": "file", + "filename": "drive1.full.qcow2" + } + } + } + + <- { "return": {} } + #. Create a full (anchor) backup for each drive, with accompanying bitmaps: .. code-block:: QMP @@ -953,21 +1034,19 @@ point in time. } }, { - "type": "drive-backup", + "type": "blockdev-backup", "data": { "device": "drive0", - "target": "/path/to/drive0.full.qcow2", - "sync": "full", - "format": "qcow2" + "target": "target0", + "sync": "full" } }, { - "type": "drive-backup", + "type": "blockdev-backup", "data": { "device": "drive1", - "target": "/path/to/drive1.full.qcow2", - "sync": "full", - "format": "qcow2" + "target": "target1", + "sync": "full" } } ] @@ -1016,6 +1095,38 @@ point in time. $ qemu-img create -f qcow2 drive1.inc0.qcow2 \ -b drive1.full.qcow2 -F qcow2 +#. Add target block nodes: + + .. code-block:: QMP + + -> { + "execute": "blockdev-add", + "arguments": { + "node-name": "target0", + "driver": "qcow2", + "file": { + "driver": "file", + "filename": "drive0.inc0.qcow2" + } + } + } + + <- { "return": {} } + + -> { + "execute": "blockdev-add", + "arguments": { + "node-name": "target1", + "driver": "qcow2", + "file": { + "driver": "file", + "filename": "drive1.inc0.qcow2" + } + } + } + + <- { "return": {} } + #. Issue a multi-drive incremental push backup transaction: .. code-block:: QMP @@ -1025,25 +1136,21 @@ point in time. "arguments": { "actions": [ { - "type": "drive-backup", + "type": "blockev-backup", "data": { "device": "drive0", "bitmap": "bitmap0", - "format": "qcow2", - "mode": "existing", "sync": "incremental", - "target": "drive0.inc0.qcow2" + "target": "target0" } }, { - "type": "drive-backup", + "type": "blockdev-backup", "data": { "device": "drive1", "bitmap": "bitmap0", - "format": "qcow2", - "mode": "existing", "sync": "incremental", - "target": "drive1.inc0.qcow2" + "target": "target1" } }, ] @@ -1119,19 +1226,35 @@ described above. This example demonstrates the single-job failure case: $ qemu-img create -f qcow2 drive0.inc0.qcow2 \ -b drive0.full.qcow2 -F qcow2 +#. Add target block node: + + .. code-block:: QMP + + -> { + "execute": "blockdev-add", + "arguments": { + "node-name": "target0", + "driver": "qcow2", + "file": { + "driver": "file", + "filename": "drive0.inc0.qcow2" + } + } + } + + <- { "return": {} } + #. Attempt to create an incremental backup via QMP: .. code-block:: QMP -> { - "execute": "drive-backup", + "execute": "blockdev-backup", "arguments": { "device": "drive0", "bitmap": "bitmap0", - "target": "drive0.inc0.qcow2", - "format": "qcow2", - "sync": "incremental", - "mode": "existing" + "target": "target0", + "sync": "incremental" } } @@ -1164,6 +1287,19 @@ described above. This example demonstrates the single-job failure case: "event": "BLOCK_JOB_COMPLETED" } +#. Remove target node: + + .. code-block:: QMP + + -> { + "execute": "blockdev-del", + "arguments": { + "node-name": "target0", + } + } + + <- { "return": {} } + #. Delete the failed image, and re-create it. .. code:: bash @@ -1172,20 +1308,36 @@ described above. This example demonstrates the single-job failure case: $ qemu-img create -f qcow2 drive0.inc0.qcow2 \ -b drive0.full.qcow2 -F qcow2 +#. Add target block node: + + .. code-block:: QMP + + -> { + "execute": "blockdev-add", + "arguments": { + "node-name": "target0", + "driver": "qcow2", + "file": { + "driver": "file", + "filename": "drive0.inc0.qcow2" + } + } + } + + <- { "return": {} } + #. Retry the command after fixing the underlying problem, such as freeing up space on the backup volume: .. code-block:: QMP -> { - "execute": "drive-backup", + "execute": "blockdev-backup", "arguments": { "device": "drive0", "bitmap": "bitmap0", - "target": "drive0.inc0.qcow2", - "format": "qcow2", - "sync": "incremental", - "mode": "existing" + "target": "target0", + "sync": "incremental" } } @@ -1210,7 +1362,8 @@ described above. This example demonstrates the single-job failure case: Example: Partial Transactional Failures ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -QMP commands like `drive-backup `_ +QMP commands like `blockdev-backup +`_ conceptually only start a job, and so transactions containing these commands may succeed even if the job it created later fails. This might have surprising interactions with notions of how a "transaction" ought to behave. @@ -1240,25 +1393,21 @@ and one succeeds: "arguments": { "actions": [ { - "type": "drive-backup", + "type": "blockdev-backup", "data": { "device": "drive0", "bitmap": "bitmap0", - "format": "qcow2", - "mode": "existing", "sync": "incremental", - "target": "drive0.inc0.qcow2" + "target": "target0" } }, { - "type": "drive-backup", + "type": "blockdev-backup", "data": { "device": "drive1", "bitmap": "bitmap0", - "format": "qcow2", - "mode": "existing", "sync": "incremental", - "target": "drive1.inc0.qcow2" + "target": "target1" } }] } @@ -1375,25 +1524,21 @@ applied: }, "actions": [ { - "type": "drive-backup", + "type": "blockdev-backup", "data": { "device": "drive0", "bitmap": "bitmap0", - "format": "qcow2", - "mode": "existing", "sync": "incremental", - "target": "drive0.inc0.qcow2" + "target": "target0" } }, { - "type": "drive-backup", + "type": "blockdev-backup", "data": { "device": "drive1", "bitmap": "bitmap0", - "format": "qcow2", - "mode": "existing", "sync": "incremental", - "target": "drive1.inc0.qcow2" + "target": "target1" } }] } From patchwork Wed May 5 13:58:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Sementsov-Ogievskiy X-Patchwork-Id: 1474338 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=virtuozzo.com header.i=@virtuozzo.com header.a=rsa-sha256 header.s=selector2 header.b=W9Z90Skb; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FZz425HNwz9sRR for ; Thu, 6 May 2021 00:04:50 +1000 (AEST) Received: from localhost ([::1]:45250 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1leI8u-0006hC-OT for incoming@patchwork.ozlabs.org; Wed, 05 May 2021 10:04:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37748) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1leI3K-00030D-JS; Wed, 05 May 2021 09:59:02 -0400 Received: from mail-db8eur05on2103.outbound.protection.outlook.com ([40.107.20.103]:55905 helo=EUR05-DB8-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1leI3H-0005oK-JP; Wed, 05 May 2021 09:59:02 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=evk+757OElaFf0xQCVHbbFP8WKMKyR77lObhLjpIB06n/C0l3Lo+zu8SA2VhScVx+eskqmbxyehDHxCHDdcp565qEWbx/4ImOBq5WBzrkj+YBTJx4K+GUegiSDbBz7Uzk15UCU03HboJRS+eXvBuwc8J6YT65iau3rIopPQ+jbL4hkqbLXw+zhvBAEqjb75JGz+nG1434KldkECW+lHPMi2+KSqcA86ncr1vPSJkMxRYcwktfzd7zhQNTDdooNiiCGqdSVOAsILZRFQRCZD6wRkqvv2LeTYaR3Cw8cjd1pN7OCg1bKYwwpnsfWQBIDpBkyIqJRxDKoiAW7/5om37hw== 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-SenderADCheck; bh=GeSmp9IdnS99SxoqHutwshzeQfNsboNYpjAzxOkGkGA=; b=REcllEgqxnez15MrLIIxCXiTQNQ/HMupboilY6OWOFSsWr12gZPdx8eXZvLe7vFXcTsJmtM9wKoW68quRns5qbXAm0vG5X207DHSh1meg4SS9y5STMzlzAPVIzDyeYhYA28Cka1oDUXZBzyM3BsfVmEtLO54VSaKek72tJr5ZAcqdubOOgI2OV87dt+sA4c1LUUDM26Dqv3R2H6GNlWdC8bshqc4F5MwdaQzEdVxqhs6EuYehogCe7EQQMniOoPJpTwnSKr74fptfOnBGnVfftjjW5eLhSpZZzJIh+p930MwIzj1EUdf5HWvD1+D8Z6pveShGjfqSCEUgGcCo/X7pg== 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=GeSmp9IdnS99SxoqHutwshzeQfNsboNYpjAzxOkGkGA=; b=W9Z90SkbxsXieduPGnQJ3ySC0wmh+ceP1j1qpgmdVc11JgA0evKaDBprWyGok9i4xjR7B5PT4PgCJeJIEAbCBB+AUMEC1W5wRVj+f5jblK19MJSie7Ywkmr5qzDDSqGoAOVO+GR7/FKDVM0sdEKxgjr/80VLi5S5zFGDhoXTkmY= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=virtuozzo.com; 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 From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, armbru@redhat.com, libvir-list@redhat.com, jsnow@redhat.com, vsementsov@virtuozzo.com, eblake@redhat.com, xiechanglong.d@gmail.com, wencongyang2@huawei.com, nshirokovskiy@virtuozzo.com, pkrempa@redhat.com, den@openvz.org, yur@virtuozzo.com, dim@virtuozzo.com, berrange@redhat.com, kchamart@redhat.com 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> X-Mailer: git-send-email 2.29.2 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 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-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: XGTLVi0k9J7v/7HxFL4jwOQKAyWmOlh815ts4IW2jNXX2XbswwOEXKB0xKrzJ/UOLAnxH8TPaL/y+bOf2y5+myHVTUfguDfB5tP/LlrBc/Zh/bG0QMvQ+6FBAW66Bgp+7Z6qcnlWDCohwwTQMOF+ixyARFxOJnx/BzutQiuZwl03GXOA5FdkXZpSj81hlBoNK19mCF0Agk66nILGptjLFzVpogD6rGOjSD6oDdCF3CRXvqME6NHbwoSL2iSHKxQX9Rbnx4WHIRRcNuouan780ufDWxOzhsDzXwdCn7tUKwSACtBdFchNCb9R4BidrpKLB+QAYk59eN/X8Z32Davqa2jQyPnR2d4p/c8aRJsuBsZuh+8jU7ZlvTdxeWVeAQ1MeYFAfab3hfnVhvTxfdFzijbJ+joQBdxJ1BNjS0//pAVXbR52RxD2ZviyENO05Cnxjs9HPhYOHvkjZZkWPTg7UHm7m7qhhj88DTWWUSRtY9my73OfX1hVMWxZ9cJ1xqCp3aYv9RaEpzmV/qdE7d1GPi6koGXwb5Ch8Ika1o/u8Xu6VAPEu/WADa72qxqiJKE0Yh74dvJqZMuzVsap/83MB3bgiuvY22r8SohPBT+ND5D3tkorGnPx/nVpizwBYbrrqh33WzI8q0hF8Fc+8tj/k2nl8uYq0M/qPNSdraBHA2uVJxf7z9KZNe5mIYujLUmAy164/++osh2sGQEg+6kP+zCwGViaLXK1qXW8BBfzxv23r5C7n214tCQ8XfsxZRKUIv7CiE+sOiDlDDqckbBxz8m+mA/fztaZRKhrFmrr6BXF+7c1wqXkrI614XuoGwl1e3Wi8TXkVkdS2t7WUzYL8tlaMDIOJAbqfwdJdpk+zePLBvjzMsT8FkKkYldU6ntdIkiQSIqItRlmhxyfvldmx5AEctGZTU829u7LtQ2Y3aJYtR/ZwRmSz4/Rm6XanNzn/PZ4vPWwj9kwhpz+MDBEDW1a1oaEio1w32pRw0CYA31znyl/U5l4XYcGde/kPnk4ypr0UVbRARkjcK0jThUtO9tq9CNPfEAc4GfQE6spc2u0m5bkKqqi3E38lH7SJFwlIErewRBFfYRIz9QsEh+p0flogzjt/e0v2pDPQgSJh8xDkpc4H5SzZG4yecHmDuDfbVb5BBMhvQ0Ntr/kakRXiaus7xQIAKb0tKINLSQiI86Su5C74Ney150bW4RmcsPYcg14HegWbPV3ah9/xL0OKy9+UpR0lE3J15S45YSIPq1Kqox3zeQi2tzQGi1SEsvxUNB1vrRLicZjdOhLW5AqMQbFiEE8P/pziJwGsvZsfTzCHu0Vdv+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 Received-SPF: pass client-ip=40.107.20.103; envelope-from=vsementsov@virtuozzo.com; helo=EUR05-DB8-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Modern way is using blockdev-add + blockdev-backup, which provides a lot more control on how target is opened. As example of drive-backup problems consider the following: User of drive-backup expects that target will be opened in the same cache and aio mode as source. Corresponding logic is in drive_backup_prepare(), where we take bs->open_flags of source. It works rather bad if source was added by blockdev-add. Assume source is qcow2 image. On blockdev-add we should specify aio and cache options for file child of qcow2 node. What happens next: drive_backup_prepare() looks at bs->open_flags of qcow2 source node. But there no BDRV_O_NOCAHE neither BDRV_O_NATIVE_AIO: BDRV_O_NOCAHE is places in bs->file->bs->open_flags, and BDRV_O_NATIVE_AIO is nowhere, as file-posix parse options and simply set s->use_linux_aio. The documentation is updated in a minimal way, so that drive-backup is noted only as a deprecated command, and blockdev-backup used in most of places. Signed-off-by: Vladimir Sementsov-Ogievskiy --- 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-block-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. -(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. .. _`Interacting with a QEMU instance`: @@ -553,13 +553,14 @@ Currently, there are four different kinds: (3) ``none`` -- Synchronize only the new writes from this point on. - .. note:: In the case of ``drive-backup`` (or ``blockdev-backup``), - the behavior of ``none`` synchronization mode is different. - Normally, a ``backup`` job consists of two parts: Anything - that is overwritten by the guest is first copied out to - the backup, and in the background the whole image is - copied from start to end. With ``sync=none``, it's only - the first part. + .. note:: In the case of ``blockdev-backup`` (or deprecated + ``drive-backup``), the behavior of ``none`` + synchronization mode is different. Normally, a + ``backup`` job consists of two parts: Anything that is + overwritten by the guest is first copied out to the + backup, and in the background the whole image is copied + from start to end. With ``sync=none``, it's only the + first part. (4) ``incremental`` -- Synchronize content that is described by the dirty bitmap @@ -924,19 +925,22 @@ Shutdown the guest, by issuing the ``quit`` QMP command:: } -Live disk backup --- ``drive-backup`` and ``blockdev-backup`` -------------------------------------------------------------- +Live disk backup --- ``blockdev-backup`` and deprecated``drive-backup`` +----------------------------------------------------------------------- -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. -In this case, the point-in-time is when you *start* the ``drive-backup`` -(or its newer equivalent ``blockdev-backup``) command. +In this case, the point-in-time is when you *start* the +``blockdev-backup`` (or deprecated ``drive-backup``) command. QMP invocation for ``drive-backup`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Note that ``drive-backup`` command is deprecated since Qemu 6.1 and +will be removed in future. + Yet again, starting afresh with our example disk image chain:: [A] <-- [B] <-- [C] <-- [D] @@ -961,11 +965,22 @@ will be issued, indicating the live block device job operation has completed, and no further action is required. +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`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -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. 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``. +``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 ------------------- 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'] } ## # @blockdev-backup: