From nobody Sun Feb 8 09:32:06 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1559227277; cv=none; d=zoho.com; s=zohoarc; b=Cmyp5Et+Jn9PR3nJojeA+cvF26z/hMhETKI+PlgtBf+0tbKMXQaA95A4OSsfJn8WVTe8uHIKN+DXfve8MBpzF9DxRxt/Fi9cz7Bs/8ZomnceD1PC9LIYxwjo0htISXrSsggi/vPSaQ1y5nkeY+mPn8/EXRpTeg071lirvWGtS1k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559227277; h=Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=Dj9+ZoqvTjlMzRZOX5fBl1ap5r+cn4+hhljpGLsZSMc=; b=kDyCA2vSstg0CPH4oZD55yAcAeM80c5MI0XC+l5yeofeNqO1QjMI+HEAyCoANJ0aoq+zdvGF0jbBD4+scuOUZLUFGDH2N8wxAK91nMkZ+TVnC2a74dpSy3sFDBZkJ8QC5H37KHcvGPIb/qFUN0hxgYOf441xzdWSR2dUWqqv/dY= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1559227277500816.9197861660134; Thu, 30 May 2019 07:41:17 -0700 (PDT) Received: from localhost ([127.0.0.1]:55020 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWMF0-0007mW-Iq for importer@patchew.org; Thu, 30 May 2019 10:41:14 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52497) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWMDe-000758-SE for qemu-devel@nongnu.org; Thu, 30 May 2019 10:39:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hWMDb-0005Rr-Jr for qemu-devel@nongnu.org; Thu, 30 May 2019 10:39:49 -0400 Received: from relay.sw.ru ([185.231.240.75]:33154) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hWMDZ-0005Q3-Qr; Thu, 30 May 2019 10:39:46 -0400 Received: from [10.94.3.0] (helo=kvm.qa.sw.ru) by relay.sw.ru with esmtp (Exim 4.91) (envelope-from ) id 1hWMDW-0007WS-14; Thu, 30 May 2019 17:39:42 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org, qemu-block@nongnu.org Date: Thu, 30 May 2019 17:39:41 +0300 Message-Id: <20190530143941.241963-1-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.18.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 185.231.240.75 Subject: [Qemu-devel] [PATCH] qapi: add dirty-bitmaps to query-named-block-nodes result X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, vsementsov@virtuozzo.com, armbru@redhat.com, mreitz@redhat.com, nshirokovskiy@virtuozzo.com, den@openvz.org, jsnow@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Let's add a possibility to query dirty-bitmaps not only on root nodes. It is useful when dealing both with snapshots and incremental backups. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Reviewed-by: John Snow --- qapi/block-core.json | 5 ++++- block/qapi.c | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index 1defcde048..64ae1ab812 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -360,6 +360,9 @@ # @write_threshold: configured write threshold for the device. # 0 if disabled. (Since 2.3) # +# @dirty-bitmaps: dirty bitmaps information (only present if node +# has one or more dirty bitmaps) (Since 4.1) +# # Since: 0.14.0 # ## @@ -378,7 +381,7 @@ '*bps_wr_max_length': 'int', '*iops_max_length': 'int', '*iops_rd_max_length': 'int', '*iops_wr_max_length': 'int', '*iops_size': 'int', '*group': 'str', 'cache': 'BlockdevCacheI= nfo', - 'write_threshold': 'int' } } + 'write_threshold': 'int', '*dirty-bitmaps': ['BlockDirtyInfo']= } } =20 ## # @BlockDeviceIoStatus: diff --git a/block/qapi.c b/block/qapi.c index 0c13c86f4e..7eefdecb29 100644 --- a/block/qapi.c +++ b/block/qapi.c @@ -78,6 +78,11 @@ BlockDeviceInfo *bdrv_block_device_info(BlockBackend *bl= k, info->backing_file =3D g_strdup(bs->backing_file); } =20 + if (!QLIST_EMPTY(&bs->dirty_bitmaps)) { + info->has_dirty_bitmaps =3D true; + info->dirty_bitmaps =3D bdrv_query_dirty_bitmaps(bs); + } + info->detect_zeroes =3D bs->detect_zeroes; =20 if (blk && blk_get_public(blk)->throttle_group_member.throttle_state) { --=20 2.18.0