All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Fam Zheng" <fam@euphon.net>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	libvir-list@redhat.com,
	"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	qemu-block@nongnu.org, "Juan Quintela" <quintela@redhat.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Artyom Tarasenko" <atar4qemu@gmail.com>,
	"Laurent Vivier" <lvivier@redhat.com>,
	"Thomas Huth" <thuth@redhat.com>,
	"Eduardo Habkost" <ehabkost@redhat.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	"Greg Kurz" <groug@kaod.org>, "Cleber Rosa" <crosa@redhat.com>,
	"John Snow" <jsnow@redhat.com>,
	"David Gibson" <david@gibson.dropbear.id.au>,
	"Kevin Wolf" <kwolf@redhat.com>,
	"Vladimir Sementsov-Ogievskiy" <vsementsov@virtuozzo.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	"Max Reitz" <mreitz@redhat.com>,
	qemu-ppc@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>
Subject: [PATCH 13/14] block: remove 'dirty-bitmaps' field from 'BlockInfo' struct
Date: Wed, 24 Feb 2021 13:11:41 +0000	[thread overview]
Message-ID: <20210224131142.1952027-14-berrange@redhat.com> (raw)
In-Reply-To: <20210224131142.1952027-1-berrange@redhat.com>

The same data is available in the 'BlockDeviceInfo' struct.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 block/qapi.c                     |  5 -----
 docs/system/deprecated.rst       | 13 -------------
 docs/system/removed-features.rst | 13 +++++++++++++
 qapi/block-core.json             | 11 +----------
 tests/qemu-iotests/194           |  4 ++--
 tests/qemu-iotests/236           |  2 +-
 tests/qemu-iotests/246           |  3 ++-
 tests/qemu-iotests/254           |  2 +-
 tests/qemu-iotests/260           |  5 +++--
 9 files changed, 23 insertions(+), 35 deletions(-)

diff --git a/block/qapi.c b/block/qapi.c
index 3acc118c44..943e7b15ad 100644
--- a/block/qapi.c
+++ b/block/qapi.c
@@ -383,11 +383,6 @@ static void bdrv_query_info(BlockBackend *blk, BlockInfo **p_info,
         info->io_status = blk_iostatus(blk);
     }
 
-    if (bs && !QLIST_EMPTY(&bs->dirty_bitmaps)) {
-        info->has_dirty_bitmaps = true;
-        info->dirty_bitmaps = bdrv_query_dirty_bitmaps(bs);
-    }
-
     if (bs && bs->drv) {
         info->has_inserted = true;
         info->inserted = bdrv_block_device_info(blk, bs, false, errp);
diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst
index a8ac104c19..dc76584e02 100644
--- a/docs/system/deprecated.rst
+++ b/docs/system/deprecated.rst
@@ -162,19 +162,6 @@ Use arguments ``base-node`` and ``top-node`` instead.
 
 Specify the properties for the object as top-level arguments instead.
 
-``query-block`` result field ``dirty-bitmaps`` (Since 4.2)
-''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
-
-The ``dirty-bitmaps`` field of the ``BlockInfo`` structure, returned by
-the query-block command is itself now deprecated. The ``dirty-bitmaps``
-field of the ``BlockDeviceInfo`` struct should be used instead, which is the
-type of the ``inserted`` field in query-block replies, as well as the
-type of array items in query-named-block-nodes.
-
-Since the ``dirty-bitmaps`` field is optionally present in both the old and
-new locations, clients must use introspection to learn where to anticipate
-the field if/when it does appear in command output.
-
 ``nbd-server-add`` and ``nbd-server-remove`` (since 5.2)
 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''
 
diff --git a/docs/system/removed-features.rst b/docs/system/removed-features.rst
index 725a316a4e..990bf7e015 100644
--- a/docs/system/removed-features.rst
+++ b/docs/system/removed-features.rst
@@ -129,6 +129,19 @@ The ``status`` field of the ``BlockDirtyInfo`` structure, returned by
 these commands is deprecated. Two new boolean fields, ``recording`` and
 ``busy`` effectively replace it.
 
+``query-block`` result field ``dirty-bitmaps`` (removed in 6.0)
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+The ``dirty-bitmaps`` field of the ``BlockInfo`` structure, returned by
+the query-block command is itself now deprecated. The ``dirty-bitmaps``
+field of the ``BlockDeviceInfo`` struct should be used instead, which is the
+type of the ``inserted`` field in query-block replies, as well as the
+type of array items in query-named-block-nodes.
+
+Since the ``dirty-bitmaps`` field is optionally present in both the old and
+new locations, clients must use introspection to learn where to anticipate
+the field if/when it does appear in command output.
+
 Human Monitor Protocol (HMP) commands
 -------------------------------------
 
diff --git a/qapi/block-core.json b/qapi/block-core.json
index 2a0c345c2c..0399449e13 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -539,9 +539,6 @@
 # @tray_open: True if the device's tray is open
 #             (only present if it has a tray)
 #
-# @dirty-bitmaps: dirty bitmaps information (only present if the
-#                 driver has one or more dirty bitmaps) (Since 2.0)
-#
 # @io-status: @BlockDeviceIoStatus. Only present if the device
 #             supports it and the VM is configured to stop on errors
 #             (supported device models: virtio-blk, IDE, SCSI except
@@ -550,18 +547,12 @@
 # @inserted: @BlockDeviceInfo describing the device if media is
 #            present
 #
-# Features:
-# @deprecated: Member @dirty-bitmaps is deprecated.  Use @inserted
-#              member @dirty-bitmaps instead.
-#
 # Since:  0.14
 ##
 { 'struct': 'BlockInfo',
   'data': {'device': 'str', '*qdev': 'str', 'type': 'str', 'removable': 'bool',
            'locked': 'bool', '*inserted': 'BlockDeviceInfo',
-           '*tray_open': 'bool', '*io-status': 'BlockDeviceIoStatus',
-           '*dirty-bitmaps': { 'type': ['BlockDirtyInfo'],
-                               'features': [ 'deprecated' ] } } }
+           '*tray_open': 'bool', '*io-status': 'BlockDeviceIoStatus' } }
 
 ##
 # @BlockMeasureInfo:
diff --git a/tests/qemu-iotests/194 b/tests/qemu-iotests/194
index 3889266afa..e44b8df728 100755
--- a/tests/qemu-iotests/194
+++ b/tests/qemu-iotests/194
@@ -95,7 +95,7 @@ with iotests.FilePath('source.img') as source_img_path, \
     iotests.log(event, filters=[iotests.filter_qmp_event])
 
     iotests.log('Check bitmaps on source:')
-    iotests.log(source_vm.qmp('query-block')['return'][0]['dirty-bitmaps'])
+    iotests.log(source_vm.qmp('query-block')['return'][0]['inserted']['dirty-bitmaps'])
 
     iotests.log('Check bitmaps on target:')
-    iotests.log(dest_vm.qmp('query-block')['return'][0]['dirty-bitmaps'])
+    iotests.log(dest_vm.qmp('query-block')['return'][0]['inserted']['dirty-bitmaps'])
diff --git a/tests/qemu-iotests/236 b/tests/qemu-iotests/236
index f6c44517d6..20419bbb9e 100755
--- a/tests/qemu-iotests/236
+++ b/tests/qemu-iotests/236
@@ -39,7 +39,7 @@ overwrite = [("0xab", "0",         "64k"), # Full overwrite
 
 def query_bitmaps(vm):
     res = vm.qmp("query-block")
-    return { "bitmaps": { device['device']: device.get('dirty-bitmaps', []) for
+    return { "bitmaps": { device['device']: device.get('inserted', {}).get('dirty-bitmaps', []) for
                           device in res['return'] } }
 
 with iotests.FilePath('img') as img_path, \
diff --git a/tests/qemu-iotests/246 b/tests/qemu-iotests/246
index fa3102c546..5932a0e8a9 100755
--- a/tests/qemu-iotests/246
+++ b/tests/qemu-iotests/246
@@ -30,7 +30,8 @@ gran_large = 128 * 1024
 
 def query_bitmaps(vm):
     res = vm.qmp("query-block")
-    return { "bitmaps": { device['device']: device.get('dirty-bitmaps', []) for
+    return { "bitmaps": { device['device']: device.get('inserted', {})
+                          .get('dirty-bitmaps', []) for
                           device in res['return'] } }
 
 with iotests.FilePath('img') as img_path, \
diff --git a/tests/qemu-iotests/254 b/tests/qemu-iotests/254
index 49da948407..108bf5f894 100755
--- a/tests/qemu-iotests/254
+++ b/tests/qemu-iotests/254
@@ -73,7 +73,7 @@ vm.qmp_log('transaction', indent=2, actions=[
 result = vm.qmp('query-block')['return'][0]
 log("query-block: device = {}, node-name = {}, dirty-bitmaps:".format(
     result['device'], result['inserted']['node-name']))
-log(result['dirty-bitmaps'], indent=2)
+log(result['inserted']['dirty-bitmaps'], indent=2)
 log("\nbitmaps in backing image:")
 log(result['inserted']['image']['backing-image']['format-specific'] \
     ['data']['bitmaps'], indent=2)
diff --git a/tests/qemu-iotests/260 b/tests/qemu-iotests/260
index a35cb7b61f..2ec64a9b99 100755
--- a/tests/qemu-iotests/260
+++ b/tests/qemu-iotests/260
@@ -32,8 +32,9 @@ size = 64 * 1024 * 3
 
 def print_bitmap(msg, vm):
     result = vm.qmp('query-block')['return'][0]
-    if 'dirty-bitmaps' in result:
-        bitmap = result['dirty-bitmaps'][0]
+    info = result.get("inserted", {})
+    if 'dirty-bitmaps' in info:
+        bitmap = info['dirty-bitmaps'][0]
         log('{}: name={} dirty-clusters={}'.format(msg, bitmap['name'],
             bitmap['count'] // 64 // 1024))
     else:
-- 
2.29.2



  parent reply	other threads:[~2021-02-24 13:34 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-24 13:11 [PATCH 00/14] deprecations: remove many old deprecations Daniel P. Berrangé
2021-02-24 13:11 ` [PATCH 01/14] ui, monitor: remove deprecated VNC ACL option and HMP commands Daniel P. Berrangé
2021-02-24 13:36   ` Thomas Huth
2021-02-24 13:46     ` Daniel P. Berrangé
2021-02-24 13:11 ` [PATCH 02/14] monitor: raise error when 'pretty' option is used with HMP Daniel P. Berrangé
2021-02-24 13:20   ` Dr. David Alan Gilbert
2021-02-24 13:11 ` [PATCH 03/14] monitor: remove 'query-events' QMP command Daniel P. Berrangé
2021-02-24 13:47   ` Thomas Huth
2021-02-24 13:11 ` [PATCH 04/14] softmmu: remove '-usbdevice' command line option Daniel P. Berrangé
2021-02-24 13:25   ` Paolo Bonzini
2021-02-24 13:44     ` Daniel P. Berrangé
2021-02-24 13:58   ` Thomas Huth
2021-02-24 14:10     ` Daniel P. Berrangé
2021-02-25  5:34       ` Thomas Huth
2021-02-24 13:11 ` [PATCH 05/14] migrate: remove QMP/HMP commands for speed, downtime and cache size Daniel P. Berrangé
2021-03-11 11:54   ` Dr. David Alan Gilbert
2021-03-11 18:18     ` Paolo Bonzini
2021-03-11 18:33       ` Daniel P. Berrangé
2021-03-11 22:04         ` Paolo Bonzini
2021-02-24 13:11 ` [PATCH 06/14] machine: remove 'query-cpus' QMP command Daniel P. Berrangé
2021-02-25 12:32   ` Wainer dos Santos Moschetta
2021-02-24 13:11 ` [PATCH 07/14] machine: remove 'arch' field from 'query-cpus-fast' " Daniel P. Berrangé
2021-03-15 11:51   ` Daniel P. Berrangé
2021-03-15 11:54   ` Thomas Huth
2021-02-24 13:11 ` [PATCH 08/14] chardev: reject use of 'wait' flag for socket client chardevs Daniel P. Berrangé
2021-02-24 13:17   ` Marc-André Lureau
2021-02-24 13:11 ` [PATCH 09/14] hw/ide: remove 'ide-drive' device Daniel P. Berrangé
2021-02-24 14:19   ` Thomas Huth
2021-02-24 13:11 ` [PATCH 10/14] hw/scsi: remove 'scsi-disk' device Daniel P. Berrangé
2021-02-24 14:26   ` Thomas Huth
2021-03-11 10:46     ` Daniel P. Berrangé
2021-03-15 12:21   ` Thomas Huth
2021-02-24 13:11 ` [PATCH 11/14] block: remove 'encryption_key_missing' flag from QAPI Daniel P. Berrangé
2021-02-24 15:01   ` Thomas Huth
2021-02-24 13:11 ` [PATCH 12/14] block: remove dirty bitmaps 'status' field Daniel P. Berrangé
2021-02-25 15:48   ` Vladimir Sementsov-Ogievskiy
2021-02-24 13:11 ` Daniel P. Berrangé [this message]
2021-02-25 15:54   ` [PATCH 13/14] block: remove 'dirty-bitmaps' field from 'BlockInfo' struct Vladimir Sementsov-Ogievskiy
2021-02-24 13:11 ` [PATCH 14/14] block: remove support for using "file" driver with block/char devices Daniel P. Berrangé
2021-03-15 11:56   ` Daniel P. Berrangé
2021-03-15 12:04   ` Eric Blake
2021-02-24 13:26 ` [PATCH 00/14] deprecations: remove many old deprecations Paolo Bonzini
2021-02-24 14:38 ` Peter Maydell
2021-02-24 15:02   ` Daniel P. Berrangé
2021-02-24 15:21   ` Philippe Mathieu-Daudé
2021-03-08 16:42     ` Stefan Hajnoczi
2021-02-25 17:32 ` Jim Fehlig
2021-03-01 11:15   ` Kevin Wolf
2021-03-01 11:15     ` Kevin Wolf

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=20210224131142.1952027-14-berrange@redhat.com \
    --to=berrange@redhat.com \
    --cc=armbru@redhat.com \
    --cc=atar4qemu@gmail.com \
    --cc=crosa@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=dgilbert@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=fam@euphon.net \
    --cc=groug@kaod.org \
    --cc=jsnow@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=libvir-list@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=mreitz@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=richard.henderson@linaro.org \
    --cc=thuth@redhat.com \
    --cc=vsementsov@virtuozzo.com \
    --cc=wainersm@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.