Re: [PATCH 13/14] block: remove 'dirty-bitmaps' field from 'BlockInfo' struct

2021-02-25 Thread Vladimir Sementsov-Ogievskiy

24.02.2021 16:11, Daniel P. Berrangé wrote:

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

Signed-off-by: Daniel P. Berrangé


Reviewed-by: Vladimir Sementsov-Ogievskiy 

--
Best regards,
Vladimir



[PATCH 13/14] block: remove 'dirty-bitmaps' field from 'BlockInfo' struct

2021-02-24 Thread Daniel P . Berrangé
The same data is available in the 'BlockDeviceInfo' struct.

Signed-off-by: Daniel P. Berrangé 
---
 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, f