[PATCH v2 0/5] block: refresh filter parents when child was resized

Fiona Ebner posted 5 patches 4 days, 13 hours ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20250917115509.401015-1-f.ebner@proxmox.com
Maintainers: Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>, Stefan Hajnoczi <stefanha@redhat.com>, Fam Zheng <fam@euphon.net>
block.c                                       | 12 +++
block/io.c                                    |  9 +--
include/block/block_int-common.h              |  5 +-
include/block/block_int-io.h                  |  6 ++
tests/qemu-iotests/tests/resize-below-filter  | 73 +++++++++++++++++++
.../tests/resize-below-filter.out             |  5 ++
tests/qemu-iotests/tests/resize-below-raw     | 53 ++++++++++++++
tests/qemu-iotests/tests/resize-below-raw.out |  5 ++
8 files changed, 161 insertions(+), 7 deletions(-)
create mode 100755 tests/qemu-iotests/tests/resize-below-filter
create mode 100644 tests/qemu-iotests/tests/resize-below-filter.out
create mode 100755 tests/qemu-iotests/tests/resize-below-raw
create mode 100644 tests/qemu-iotests/tests/resize-below-raw.out
[PATCH v2 0/5] block: refresh filter parents when child was resized
Posted by Fiona Ebner 4 days, 13 hours ago
Changes in v2:
* Check for BDRV_CHILD_FILTERED rather than bs->drv->is_filter which
  is more generic and for example, also covers the case when the
  child of a 'raw' node is resized.
* Expand commit message for main patch, i.e. 3/5.
* Add test for resizing the filtered 'file' node of a 'raw' node.

Resizing a node below a filter would result in the filter still
reporting the old size. Implement a 'resize' callback for the
child_of_bds class, that refreshes filter parents recursively.

Fiona Ebner (5):
  include/block/block_int-common: document when resize callback is used
  block: make bdrv_co_parent_cb_resize() a proper IO API function
  block: implement 'resize' callback for child_of_bds class
  iotests: add test for resizing a node below filters
  iotests: add test for resizing a 'file' node below a 'raw' node

 block.c                                       | 12 +++
 block/io.c                                    |  9 +--
 include/block/block_int-common.h              |  5 +-
 include/block/block_int-io.h                  |  6 ++
 tests/qemu-iotests/tests/resize-below-filter  | 73 +++++++++++++++++++
 .../tests/resize-below-filter.out             |  5 ++
 tests/qemu-iotests/tests/resize-below-raw     | 53 ++++++++++++++
 tests/qemu-iotests/tests/resize-below-raw.out |  5 ++
 8 files changed, 161 insertions(+), 7 deletions(-)
 create mode 100755 tests/qemu-iotests/tests/resize-below-filter
 create mode 100644 tests/qemu-iotests/tests/resize-below-filter.out
 create mode 100755 tests/qemu-iotests/tests/resize-below-raw
 create mode 100644 tests/qemu-iotests/tests/resize-below-raw.out

-- 
2.47.2