Received: from eggs.gnu.org ([2001:4830:134:3::10]:47260) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XjLQR-0003lv-Jg for qemu-devel@nongnu.org; Wed, 29 Oct 2014 01:04:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XjLQL-0001GE-G1 for qemu-devel@nongnu.org; Wed, 29 Oct 2014 01:04:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47229) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XjLQL-0001G6-8q for qemu-devel@nongnu.org; Wed, 29 Oct 2014 01:03:57 -0400 From: Fam Zheng Date: Wed, 29 Oct 2014 13:04:00 +0800 Message-Id: <1414559044-14501-1-git-send-email-famz@redhat.com> Subject: [Qemu-devel] [PATCH 0/4] block: Allow query stats for drive-mirror target List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Benoit Canet , Markus Armbruster , Max Reitz , Stefan Hajnoczi , Luiz Capitulino This series adds an optional bool parameter "query-nodes" to query-blockstats. By default, if omitted, the behavior is unchanged. If set to "true", the command will iterate through all named nodes in BDS graph and report the statistics in a list, similarly. But the backing chain is not built. This provides a way for libvirt to watch the allocation status (wr_highest_offset) of target image. Now, libvirt can start drive-mirror job specifying a node-name parameter. Thus the created target image gets a node name that can be queried with the new query-blockstats. Fam Zheng (4): block: Add bdrv_next_node block: Add bdrv_get_node_name block: Include "node-name" if present in query-blockstats qmp: Add optional switch "query-nodes" in query-blockstats block.c | 14 +++++++++++++- block/qapi.c | 25 ++++++++++++++++++------- hmp.c | 2 +- include/block/block.h | 2 ++ qapi/block-core.json | 9 +++++++-- qmp-commands.hx | 2 +- 6 files changed, 42 insertions(+), 12 deletions(-) -- 1.9.3