From nobody Sat Apr 20 09:10:32 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1565777270; cv=none; d=zoho.com; s=zohoarc; b=W/iXoIfxPGYu8MRJa04BthRvMtSXiHOUJst5XM1pYSoaIUwuBdDxlwWS9V5k9edpb/gCbCTU+LfnF8J+omdEF898wLTwhZ5q65rICXR3FIRuR29QT/2FGlwg2rWRlvyIB8jtQLc7PRP1SDwkoQfTJ8DrcVpdpEkoY5lkT17iuaY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565777270; 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:ARC-Authentication-Results; bh=mJjdS4iIvlH/rh56HVOQIIfTiIcKjuAF6aqwKStPzvI=; b=EIJek7bXxl8tGR8uBUUqBuQyiivUpYUF46aZAUykQsIfbPMm1di+y5gyiDJf5Rq5OMb07pv9NcFe8/Ngyt9JYdKx9xqBj3rSIUM5AFf3ygWPkH8AwOGt11aGrPcHst5WcS3piECVCCiSmXavgNg6Nw2cXxy6VzBPuzU/L8ojFEM= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1565777270427953.3023058099282; Wed, 14 Aug 2019 03:07:50 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id B794F3C928; Wed, 14 Aug 2019 10:07:48 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2FE915D9CC; Wed, 14 Aug 2019 10:07:48 +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 5F98A18005A4; Wed, 14 Aug 2019 10:07:47 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x7EA7kXG012150 for ; Wed, 14 Aug 2019 06:07:46 -0400 Received: by smtp.corp.redhat.com (Postfix) id A93278D661; Wed, 14 Aug 2019 10:07:46 +0000 (UTC) Received: from mx1.redhat.com (ext-mx17.extmail.prod.ext.phx2.redhat.com [10.5.110.46]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ADA8789D29; Wed, 14 Aug 2019 10:07:41 +0000 (UTC) Received: from relay.sw.ru (relay.sw.ru [185.231.240.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C99DA300413D; Wed, 14 Aug 2019 10:07:39 +0000 (UTC) Received: from [10.94.3.0] (helo=kvm.qa.sw.ru) by relay.sw.ru with esmtp (Exim 4.92) (envelope-from ) id 1hxqBs-00066c-UZ; Wed, 14 Aug 2019 13:07:37 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Date: Wed, 14 Aug 2019 13:07:34 +0300 Message-Id: <20190814100735.24234-2-vsementsov@virtuozzo.com> In-Reply-To: <20190814100735.24234-1-vsementsov@virtuozzo.com> References: <20190814100735.24234-1-vsementsov@virtuozzo.com> X-Greylist: Sender passed SPF test, ACL 264 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Wed, 14 Aug 2019 10:07:40 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Wed, 14 Aug 2019 10:07:40 +0000 (UTC) for IP:'185.231.240.75' DOMAIN:'relay.sw.ru' HELO:'relay.sw.ru' FROM:'vsementsov@virtuozzo.com' RCPT:'' X-RedHat-Spam-Score: 0 (SPF_HELO_NONE, SPF_PASS) 185.231.240.75 relay.sw.ru 185.231.240.75 relay.sw.ru X-Scanned-By: MIMEDefang 2.84 on 10.5.110.46 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Cc: kwolf@redhat.com, vsementsov@virtuozzo.com, libvir-list@redhat.com, qemu-devel@nongnu.org, mreitz@redhat.com, jsnow@redhat.com, den@openvz.org Subject: [libvirt] [PATCH 1/2] qapi: deprecate drive-mirror and drive-backup 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 14 Aug 2019 10:07:49 +0000 (UTC) Content-Type: text/plain; charset="utf-8" It's hard and not necessary to maintain outdated versions of these commands. Signed-off-by: Vladimir Sementsov-Ogievskiy --- qemu-deprecated.texi | 4 ++++ qapi/block-core.json | 4 ++++ qapi/transaction.json | 2 +- blockdev.c | 10 ++++++++++ 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi index fff07bb2a3..2753fafd0b 100644 --- a/qemu-deprecated.texi +++ b/qemu-deprecated.texi @@ -179,6 +179,10 @@ and accurate ``query-qmp-schema'' command. Character devices creating sockets in client mode should not specify the 'wait' field, which is only applicable to sockets in server mode =20 +@subsection drive-mirror, drive-backup and drive-backup transaction action= (since 4.2) + +Use blockdev-mirror and blockdev-backup instead. + @section Human Monitor Protocol (HMP) commands =20 @subsection The hub_id parameter of 'hostfwd_add' / 'hostfwd_remove' (sinc= e 3.1) diff --git a/qapi/block-core.json b/qapi/block-core.json index 0d43d4f37c..4e35526634 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -1635,6 +1635,8 @@ ## # @drive-backup: # +# Command is deprecated, use blockdev-mirror instead. +# # Start a point-in-time copy of a block device to a new destination. The # status of ongoing drive-backup operations can be checked with # query-block-jobs where the BlockJobInfo.type field has the value 'backup= '. @@ -1855,6 +1857,8 @@ ## # @drive-mirror: # +# Command is deprecated, use blockdev-mirror instead. +# # Start mirroring a block device's writes to a new destination. target # specifies the target of the new image. If the file exists, or if it # is a device, it will be used as the new destination for writes. If diff --git a/qapi/transaction.json b/qapi/transaction.json index 95edb78227..a16a9ff8a6 100644 --- a/qapi/transaction.json +++ b/qapi/transaction.json @@ -53,7 +53,7 @@ # - @blockdev-snapshot: since 2.5 # - @blockdev-snapshot-internal-sync: since 1.7 # - @blockdev-snapshot-sync: since 1.1 -# - @drive-backup: since 1.6 +# - @drive-backup: deprecated action, since 1.6 # # Since: 1.1 ## diff --git a/blockdev.c b/blockdev.c index 4d141e9a1f..36e9368e01 100644 --- a/blockdev.c +++ b/blockdev.c @@ -1771,6 +1771,9 @@ static void drive_backup_prepare(BlkActionState *comm= on, Error **errp) AioContext *aio_context; Error *local_err =3D NULL; =20 + warn_report("drive-backup transaction action is deprecated and will " + "disappear in future. Use blockdev-backup action instead"); + assert(common->action->type =3D=3D TRANSACTION_ACTION_KIND_DRIVE_BACKU= P); backup =3D common->action->u.drive_backup.data; =20 @@ -3591,6 +3594,10 @@ void qmp_drive_backup(DriveBackup *arg, Error **errp) { =20 BlockJob *job; + + warn_report("drive-backup command is deprecated and will disappear in " + "future. Use blockdev-backup instead"); + job =3D do_drive_backup(arg, NULL, errp); if (job) { job_start(&job->job); @@ -3831,6 +3838,9 @@ void qmp_drive_mirror(DriveMirror *arg, Error **errp) const char *format =3D arg->format; int ret; =20 + warn_report("drive-mirror command is deprecated and will disappear in " + "future. Use blockdev-mirror instead"); + bs =3D qmp_get_root_bs(arg->device, errp); if (!bs) { return; --=20 2.18.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat Apr 20 09:10:32 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1565777269; cv=none; d=zoho.com; s=zohoarc; b=ELBuXiL+V3s7SPf8Vp6acvpi3XuLQ51ZYKbjGYqqECMuCh3NrzzYs0m2x5k4ufQ2BJDkWdgt6WUGOM+9yQFx940yexfBxTXOiUqHnhzelV9LdU3xQ/D186RusXBz2xYV53V1ZjU4yx78QCGn/48WnfqLlPIKyDXwFK7HapjTfqU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565777269; 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:ARC-Authentication-Results; bh=IqKHhAQErt7gb5ipzgCz5Og86vyv/QyJpCQZnTJcEao=; b=PAZZH7WvCGyRb6lxLuO33gBXhZwLvoxqmPh0fmtrPu7L79yQYdqy3sJxt/aBCja+kwtWhc5mO6nFFKLPigW3gZGLJHXEMabSZFfsLfPXeQGgIyJbWFiSz6ZT4TAvvy4XDROY1TcWyL1wex0XQ1eYwFxkWn06swis5jVhjW5Gmvs= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 156577726996242.85837028787387; Wed, 14 Aug 2019 03:07:49 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 69D283004E7E; Wed, 14 Aug 2019 10:07:48 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 34013600D1; Wed, 14 Aug 2019 10:07:48 +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 9A1B4180B536; Wed, 14 Aug 2019 10:07:44 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x7EA7hda012134 for ; Wed, 14 Aug 2019 06:07:43 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4BF741001B32; Wed, 14 Aug 2019 10:07:43 +0000 (UTC) Received: from mx1.redhat.com (ext-mx17.extmail.prod.ext.phx2.redhat.com [10.5.110.46]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3C5771001B03; Wed, 14 Aug 2019 10:07:43 +0000 (UTC) Received: from relay.sw.ru (relay.sw.ru [185.231.240.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CBA6E3091955; Wed, 14 Aug 2019 10:07:39 +0000 (UTC) Received: from [10.94.3.0] (helo=kvm.qa.sw.ru) by relay.sw.ru with esmtp (Exim 4.92) (envelope-from ) id 1hxqBt-00066c-2J; Wed, 14 Aug 2019 13:07:37 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Date: Wed, 14 Aug 2019 13:07:35 +0300 Message-Id: <20190814100735.24234-3-vsementsov@virtuozzo.com> In-Reply-To: <20190814100735.24234-1-vsementsov@virtuozzo.com> References: <20190814100735.24234-1-vsementsov@virtuozzo.com> X-Greylist: Sender passed SPF test, ACL 264 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Wed, 14 Aug 2019 10:07:41 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Wed, 14 Aug 2019 10:07:41 +0000 (UTC) for IP:'185.231.240.75' DOMAIN:'relay.sw.ru' HELO:'relay.sw.ru' FROM:'vsementsov@virtuozzo.com' RCPT:'' X-RedHat-Spam-Score: 0 (SPF_HELO_NONE, SPF_PASS) 185.231.240.75 relay.sw.ru 185.231.240.75 relay.sw.ru X-Scanned-By: MIMEDefang 2.84 on 10.5.110.46 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: kwolf@redhat.com, vsementsov@virtuozzo.com, libvir-list@redhat.com, qemu-devel@nongnu.org, mreitz@redhat.com, jsnow@redhat.com, den@openvz.org Subject: [libvirt] [PATCH 2/2] qapi: deprecate implicit filters 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Wed, 14 Aug 2019 10:07:48 +0000 (UTC) Content-Type: text/plain; charset="utf-8" To get rid of implicit filters related workarounds in future let's deprecate them now. Signed-off-by: Vladimir Sementsov-Ogievskiy --- qemu-deprecated.texi | 7 +++++++ qapi/block-core.json | 6 ++++-- include/block/block_int.h | 10 +++++++++- blockdev.c | 10 ++++++++++ 4 files changed, 30 insertions(+), 3 deletions(-) diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi index 2753fafd0b..8222440148 100644 --- a/qemu-deprecated.texi +++ b/qemu-deprecated.texi @@ -183,6 +183,13 @@ the 'wait' field, which is only applicable to sockets = in server mode =20 Use blockdev-mirror and blockdev-backup instead. =20 +@subsection implicit filters (since 4.2) + +Mirror and commit jobs inserts filters, which becomes implicit if user +omitted filter-node-name parameter. So omitting it is deprecated, set it +always. Note, that drive-mirror don't have this parameter, so it will +create implicit filter anyway, but drive-mirror is deprecated itself too. + @section Human Monitor Protocol (HMP) commands =20 @subsection The hub_id parameter of 'hostfwd_add' / 'hostfwd_remove' (sinc= e 3.1) diff --git a/qapi/block-core.json b/qapi/block-core.json index 4e35526634..0505ac9d8b 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -1596,7 +1596,8 @@ # @filter-node-name: the node name that should be assigned to the # filter driver that the commit job inserts into the gr= aph # above @top. If this option is not given, a node name = is -# autogenerated. (Since: 2.9) +# autogenerated. Omitting this option is deprecated, it= will +# be required in future. (Since: 2.9) # # @auto-finalize: When false, this job will wait in a PENDING state after = it has # finished its work, waiting for @block-job-finalize before @@ -2249,7 +2250,8 @@ # @filter-node-name: the node name that should be assigned to the # filter driver that the mirror job inserts into the gr= aph # above @device. If this option is not given, a node na= me is -# autogenerated. (Since: 2.9) +# autogenerated. Omitting this option is deprecated, it= will +# be required in future. (Since: 2.9) # # @copy-mode: when to copy data to the destination; defaults to 'backgroun= d' # (Since: 3.0) diff --git a/include/block/block_int.h b/include/block/block_int.h index 3aa1e832a8..624da0b4a2 100644 --- a/include/block/block_int.h +++ b/include/block/block_int.h @@ -762,7 +762,15 @@ struct BlockDriverState { bool sg; /* if true, the device is a /dev/sg* */ bool probed; /* if true, format was probed rather than specified */ bool force_share; /* if true, always allow all shared permissions */ - bool implicit; /* if true, this filter node was automatically inserte= d */ + + /* + * @implicit field is deprecated, don't set it to true for new filters. + * If true, this filter node was automatically inserted and user don't + * know about it and unprepared for any effects of it. So, implicit + * filters are workarounded and skipped in many places of the block + * layer code. + */ + bool implicit; =20 BlockDriver *drv; /* NULL means no media */ void *opaque; diff --git a/blockdev.c b/blockdev.c index 36e9368e01..b3cfaccce1 100644 --- a/blockdev.c +++ b/blockdev.c @@ -3292,6 +3292,11 @@ void qmp_block_commit(bool has_job_id, const char *j= ob_id, const char *device, BlockdevOnError on_error =3D BLOCKDEV_ON_ERROR_REPORT; int job_flags =3D JOB_DEFAULT; =20 + if (!has_filter_node_name) { + warn_report("Omitting filter-node-name parameter is deprecated, it= " + "will be required in future"); + } + if (!has_speed) { speed =3D 0; } @@ -3990,6 +3995,11 @@ void qmp_blockdev_mirror(bool has_job_id, const char= *job_id, Error *local_err =3D NULL; int ret; =20 + if (!has_filter_node_name) { + warn_report("Omitting filter-node-name parameter is deprecated, it= " + "will be required in future"); + } + bs =3D qmp_get_root_bs(device, errp); if (!bs) { return; --=20 2.18.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list