From nobody Sat Feb 7 11:05:25 2026 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