qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
To: qemu-block@nongnu.org
Cc: kwolf@redhat.com, pkrempa@redhat.com, libvir-list@redhat.com,
	armbru@redhat.com, philmd@redhat.com, qemu-devel@nongnu.org,
	mreitz@redhat.com, jsnow@redhat.com, vsementsov@virtuozzo.com,
	dinechin@redhat.com, den@openvz.org, mlevitsk@redhat.com
Subject: [PATCH v2 1/2] qapi: add filter-node-name option to drive-mirror
Date: Fri,  8 Nov 2019 13:16:54 +0300	[thread overview]
Message-ID: <20191108101655.10611-2-vsementsov@virtuozzo.com> (raw)
In-Reply-To: <20191108101655.10611-1-vsementsov@virtuozzo.com>

To correspond to blockdev-mirror command and make it possible to
deprecate implicit filters in the next commit.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
---
 qapi/block-core.json | 7 +++++++
 blockdev.c           | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/qapi/block-core.json b/qapi/block-core.json
index aa97ee2641..93530d3a13 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -1992,6 +1992,12 @@
 # @on-target-error: the action to take on an error on the target,
 #                   default 'report' (no limitations, since this applies to
 #                   a different block device than @device).
+#
+# @filter-node-name: the node name that should be assigned to the
+#                    filter driver that the mirror job inserts into the graph
+#                    above @device. If this option is not given, a node name is
+#                    autogenerated. (Since: 4.2)
+#
 # @unmap: Whether to try to unmap target sectors where source has
 #         only zero. If true, and target unallocated sectors will read as zero,
 #         target image sectors will be unmapped; otherwise, zeroes will be
@@ -2022,6 +2028,7 @@
             '*speed': 'int', '*granularity': 'uint32',
             '*buf-size': 'int', '*on-source-error': 'BlockdevOnError',
             '*on-target-error': 'BlockdevOnError',
+            '*filter-node-name': 'str',
             '*unmap': 'bool', '*copy-mode': 'MirrorCopyMode',
             '*auto-finalize': 'bool', '*auto-dismiss': 'bool' } }
 
diff --git a/blockdev.c b/blockdev.c
index 8e029e9c01..2ca614c77f 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -4008,7 +4008,7 @@ void qmp_drive_mirror(DriveMirror *arg, Error **errp)
                            arg->has_on_source_error, arg->on_source_error,
                            arg->has_on_target_error, arg->on_target_error,
                            arg->has_unmap, arg->unmap,
-                           false, NULL,
+                           arg->has_filter_node_name, arg->filter_node_name,
                            arg->has_copy_mode, arg->copy_mode,
                            arg->has_auto_finalize, arg->auto_finalize,
                            arg->has_auto_dismiss, arg->auto_dismiss,
-- 
2.21.0



  reply	other threads:[~2019-11-08 10:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-08 10:16 [PATCH v2 0/2] Deprecate implicit filters Vladimir Sementsov-Ogievskiy
2019-11-08 10:16 ` Vladimir Sementsov-Ogievskiy [this message]
2019-11-08 13:30   ` [PATCH v2 1/2] qapi: add filter-node-name option to drive-mirror Peter Krempa
2019-11-08 10:16 ` [PATCH v2 2/2] qapi: deprecate implicit filters Vladimir Sementsov-Ogievskiy
2019-11-08 13:27   ` Peter Krempa
2019-11-08 13:56     ` Vladimir Sementsov-Ogievskiy
2019-11-08 14:18       ` Peter Krempa
2019-11-08 12:00 ` [PATCH v2 0/2] Deprecate " no-reply
2019-11-08 12:17   ` Vladimir Sementsov-Ogievskiy
2019-11-08 13:06 ` Maxim Levitsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191108101655.10611-2-vsementsov@virtuozzo.com \
    --to=vsementsov@virtuozzo.com \
    --cc=armbru@redhat.com \
    --cc=den@openvz.org \
    --cc=dinechin@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=libvir-list@redhat.com \
    --cc=mlevitsk@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=philmd@redhat.com \
    --cc=pkrempa@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).