From nobody Fri Apr 26 05:11:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=quarantine dis=quarantine) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1619182781; cv=none; d=zohomail.com; s=zohoarc; b=D6SXLG8BJAbIY/U0fFoJeKTmdEgmtt2ZuZzADLPGf3EG6Xtw1v5RuJzAqpl2hHybWkuOK7gYaxG8UD/6+vRMvE/1BmmL2HOam6X54tVmNDXdLhlKG0rKNmWjpVj5lwiu7t7xoJbRiqxZTh3PmEUA17xXURrkCyUv6+gAqwPQu6o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1619182781; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=CPGL6SuatA9MnkuslK/9gcH2pO5YcAttXe7Ki7RZamg=; b=cQXD2o8yHUf0qGAAsQ0C3BfkkOCxGHfSYBqs+jO8900NM0SS//hvGuJrb747S+DfLpzaltS0LfIcizlHl83KiR+Ey3v9NiiYuxhh+khq9B+lq4lfnpc9I3ZWhEW47V4+Re9SQjSJqMNNto1rvQXyFHd9wbOO+w1Y3F9tdtNTwNw= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=quarantine dis=quarantine) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1619182781607731.0671881097452; Fri, 23 Apr 2021 05:59:41 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-203-X_7-sv0LOCeqdzYQrTLrjw-1; Fri, 23 Apr 2021 08:59:37 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id ECA741006C91; Fri, 23 Apr 2021 12:59:31 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C311E1B5BB; Fri, 23 Apr 2021 12:59:31 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 8B2FF44A58; Fri, 23 Apr 2021 12:59:31 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 13NCxTax017851 for ; Fri, 23 Apr 2021 08:59:29 -0400 Received: by smtp.corp.redhat.com (Postfix) id 35AC321FF3B2; Fri, 23 Apr 2021 12:59:29 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast02.extmail.prod.ext.rdu2.redhat.com [10.11.55.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2F0992207C19 for ; Fri, 23 Apr 2021 12:59:26 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id AC1F4A28809 for ; Fri, 23 Apr 2021 12:59:26 +0000 (UTC) Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80105.outbound.protection.outlook.com [40.107.8.105]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-233-rrAJCgwTNOWoG_AYqdy-nw-1; Fri, 23 Apr 2021 08:59:22 -0400 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) by AM6PR08MB4723.eurprd08.prod.outlook.com (2603:10a6:20b:c8::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.21; Fri, 23 Apr 2021 12:59:18 +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.4065.021; Fri, 23 Apr 2021 12:59:18 +0000 Received: from localhost.localdomain (185.215.60.222) by HE1P190CA0006.EURP190.PROD.OUTLOOK.COM (2603:10a6:3:bc::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.21 via Frontend Transport; Fri, 23 Apr 2021 12:59:17 +0000 X-MC-Unique: X_7-sv0LOCeqdzYQrTLrjw-1 X-MC-Unique: rrAJCgwTNOWoG_AYqdy-nw-1 From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Subject: [PATCH] qapi: deprecate drive-backup Date: Fri, 23 Apr 2021 15:59:00 +0300 Message-ID: <20210423125900.3640-1-vsementsov@virtuozzo.com> X-Originating-IP: [185.215.60.222] X-ClientProxiedBy: HE1P190CA0006.EURP190.PROD.OUTLOOK.COM (2603:10a6:3:bc::16) To AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f4fbfa03-371b-4988-6c99-08d906579b3b X-MS-TrafficTypeDiagnostic: AM6PR08MB4723: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4502 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0 X-Microsoft-Antispam-Message-Info: qm7TA0o6oMmmjlBBlONmcyyIKT19UAZV2l9WkdKlwHitHIvoA+CMybRx9jh0cQOAZrlRXDyY4vqeH4AdDsX6/wecECsxHO/1gPY8uA2ruIAcAyeKWHu/Odch4gPQnR8IGNQoHt0FTFKqBoKKLbyBxNiF3XshAKUBVRtX3N+X1vwDHBnOQy+/YsUSi3pMKyrM2VzTrWq2pzmswAkHnDSgS4qz46uwenRpEJOewdiGcpeMdl4VmQR6k2HWlIxl4aQIDO8Y7a3nB1twNYbgk4Xf7eqIbZG3HpgxRfNbAQ88iWy752D2sTMTXBPR1LOXGRdKJaT/w2PfTFRIIEYi0DOPCWVrnyqAWdJL8wAcz/uM0xVAZwRVn2U0I18m+K9RPmqL/quTwAVSjaUOb4laOd3zIBz+Ai02nwA8pLgY9JhG7daYYQUy5Q1tIuIMp5qa1sgFM684silYqGmExryS2YT0jB2JWCxm2MpY3uScZnKALsO6+9348w7E1xVRYA13OS32fEmPDDWy/mJ0O4u4jcv1Dk66as2RXgESPTPlZQZxy7KkCjda5Www3m5vOkUCPgAGb8MHWYumRllM26o7rnW8fqYeHq5hg/LTZ/O3+rBylOAJ6VJERZjSE+elM/pVPrifUPPAkGK3zhE6jk9Ds4Pk98C9N0Cmt5xNZlWtKPhzeqEwETNvab3R5QpkF2UXjFmY 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)(346002)(376002)(366004)(136003)(39830400003)(396003)(38350700002)(186003)(6916009)(1076003)(52116002)(4326008)(6506007)(36756003)(8936002)(38100700002)(16526019)(83380400001)(6512007)(26005)(66946007)(8676002)(6486002)(66476007)(66556008)(86362001)(5660300002)(2616005)(956004)(6666004)(2906002)(316002)(478600001)(69590400013); DIR:OUT; SFP:1102 X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?FK4GL05oTFwp7I8hCXl0mmhk1o2gQ+XzvAuN0OiL0FzmUEIYVq54Ysk6b4q1?= =?us-ascii?Q?k2qSvETlL8sxpnpk+pZcwGQyYETmrwoDmv5nOMhfwLTZofLIAD8UOBSk6A1W?= =?us-ascii?Q?bIxqfr/1S+LKimwwdnD65BFTAcVh/+ApL2r/IbTVoVw/G0VXaotiLOsmf0YL?= =?us-ascii?Q?363rnZWJ3zSBmPRmulfI5ZbY8AUYJdEt9oU2lvbJNJzMflg5uvcP4L0uj6HZ?= =?us-ascii?Q?cjYE8Jf5hJPQHmUKJm+Y+hVoWgC8cy+wxCP+mq79ZH1nZ5xL9KOYWxlJPUZc?= =?us-ascii?Q?SmOzvvkpmZsrXLHYfJaznLThBhOSuakxsSrx8aJdiFfBMx1zovUUoVMRksrH?= =?us-ascii?Q?bQD12HY50lSxf3k9GbTMt0MrAVjXUumdXv0xObFep3G1TADLPpJjxkN0irCx?= =?us-ascii?Q?fl9OvG/EIEW53K5YXOTiUwAUWrLxLp48XDXie5RzIWF54nNf1LZ6CuH5O3aW?= =?us-ascii?Q?3VSJUzbNs+CTg8SZWwFKbkZnGyloiwOpWIPi/7IZNfbnaDqzy22ufwIboWYo?= =?us-ascii?Q?Rgtn2fUjYcO775QXiPNvyQIk0/eKcKRLT2bbZtgFvrjGKPN/CICYRHXR9sCS?= =?us-ascii?Q?6TgbcnfbzGriAAYxcu2oXh/QBbB4C0tVBX/H4msP/s6FMbXKASuA8e/4P8t0?= =?us-ascii?Q?hTUdKAiI/Ynp7Pe1PgGMSO2zKOZ9HwWwHeS/WEUj44ZKRa7u/IGu+T05blg0?= =?us-ascii?Q?cO+sRR+j8C6STQ3NIep1fksKIgQkzP08nFV497shjY8cTC7DHzQXFgh5yKv/?= =?us-ascii?Q?H4A6xxDGbJXqZmNnnLnANi2WVhdcAH4dzh/Wgy4+MdbX+fEw2yBZAOFASQbY?= =?us-ascii?Q?11fxh5s27GQ6f5xiY+TDDqo5huo360kjqSORoTJ2eWE0ftlJ+zmoD4MDfejY?= =?us-ascii?Q?rKjCsybxa464I59ccQwv9FpzYH4aVk8WIOVXWxCQouQqhEwU+sw/lj+ff7ec?= =?us-ascii?Q?5I+FXb5sIDRgKdHCHUOrMQyjuwykayycy+Q4219YOsUfVHuD579L2xXjU0jz?= =?us-ascii?Q?TR5TqIeDsMNcmBsIeXD9EADOxPMUbWbHO7ru927EC/0Ig6lHF/YMcpRphNfk?= =?us-ascii?Q?rnS8oi3iJb5BwXf4QnQqV5o+B8A8YZcAd6bdiLFxlIkopWfcao9UcxvNUk/p?= =?us-ascii?Q?5GFqjhMVZI2BKBparVCfUJEGgzy4XtV7Rhsae9XNUOIzCp0/LYblzdQ4UNtJ?= =?us-ascii?Q?OFCQK8MBON7hWQN5G2ziDhIsE6vJkou4IT0Qws59emRptjwqGV8RFxnK04U5?= =?us-ascii?Q?MmLTfmbsiU4NzkSkHB7yYLdTzldeLg2Vd7Q2PYkqwqWDZ7Jqa4E2lt0Im5OB?= =?us-ascii?Q?GZ0AEkFhmEHAljmC86asEXXR?= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: f4fbfa03-371b-4988-6c99-08d906579b3b X-MS-Exchange-CrossTenant-AuthSource: AM7PR08MB5494.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Apr 2021 12:59:18.7901 (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: v9y/Kc/593pk1xAThY9zEIKb7X8sUrTcNRbA6fzE0m/FumJ2Q83qaHdC/iFWhBWzxGbimop+A5d5Qg+hbQUrQJhPrFQsHnt8l5vTciOr3Ts= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4723 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 13NCxTax017851 X-loop: libvir-list@redhat.com Cc: kwolf@redhat.com, vsementsov@virtuozzo.com, libvir-list@redhat.com, qemu-devel@nongnu.org, mreitz@redhat.com, pkrempa@redhat.com, nshirokovskiy@virtuozzo.com, den@openvz.org, jsnow@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Modern way is using blockdev-add + blockdev-backup, which provides a lot more control on how target is opened. As example of drive-backup problems consider the following: User of drive-backup expects that target will be opened in the same cache and aio mode as source. Corresponding logic is in drive_backup_prepare(), where we take bs->open_flags of source. It works rather bad if source was added by blockdev-add. Assume source is qcow2 image. On blockdev-add we should specify aio and cache options for file child of qcow2 node. What happens next: drive_backup_prepare() looks at bs->open_flags of qcow2 source node. But there no BDRV_O_NOCAHE neither BDRV_O_NATIVE_AIO: BDRV_O_NOCAHE is places in bs->file->bs->open_flags, and BDRV_O_NATIVE_AIO is nowhere, as file-posix parse options and simply set s->use_linux_aio. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Peter Krempa --- Hi all! I remember, I suggested to deprecate drive-backup some time ago, and nobody complain.. But that old patch was inside the series with other more questionable deprecations and it did not landed. Let's finally deprecate what should be deprecated long ago. We now faced a problem in our downstream, described in commit message. In downstream I've fixed it by simply enabling O_DIRECT and linux_aio unconditionally for drive_backup target. But actually this just shows that using drive-backup in blockdev era is a bad idea. So let's motivate everyone (including Virtuozzo of course) to move to new interfaces and avoid problems with all that outdated option inheritance. docs/system/deprecated.rst | 5 +++++ qapi/block-core.json | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst index 80cae86252..b6f5766e17 100644 --- a/docs/system/deprecated.rst +++ b/docs/system/deprecated.rst @@ -186,6 +186,11 @@ Use the more generic commands ``block-export-add`` and= ``block-export-del`` instead. As part of this deprecation, where ``nbd-server-add`` used a single ``bitmap``, the new ``block-export-add`` uses a list of ``bitmaps``. =20 +``drive-backup`` (since 6.0) +'''''''''''''''''''''''''''' + +Use ``blockdev-backup`` in pair with ``blockdev-add`` instead. + System accelerators ------------------- =20 diff --git a/qapi/block-core.json b/qapi/block-core.json index 6d227924d0..8e2c6e1622 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -1642,6 +1642,9 @@ # The operation can be stopped before it has completed using the # block-job-cancel command. # +# Features: +# @deprecated: This command is deprecated. Use @blockdev-backup instead. +# # Returns: - nothing on success # - If @device is not a valid block device, GenericError # @@ -1657,7 +1660,7 @@ # ## { 'command': 'drive-backup', 'boxed': true, - 'data': 'DriveBackup' } + 'data': 'DriveBackup', 'features': ['deprecated'] } =20 ## # @blockdev-backup: --=20 2.29.2