Skip to content

block: refresh filter parents when child was resized

Fiona Ebner qemu-devel 2 versions – Applied

Status from this message: Thanks, applied to the block branch.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 2 repliesApplied
  2. v14 patches 6 repliesSuperseded

Changes in v2 from the cover letter

* 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.

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/5include/block/block_int-common: document when resize callback is usedinclude/block/block_int-common.h+3 -00 replies
2/5block: make bdrv_co_parent_cb_resize() a proper IO API functionblock/io.c include/block/block_int-io.h+9 -60 replies
3/5block: implement 'resize' callback for child_of_bds classblock.c include/block/block_int-common.h+13 -10 replies
4/5iotests: add test for resizing a node below filterstests/qemu-iotests/tests/resize-below-filter tests/qemu-iotests/tests/resize-below-filter.out+78 -00 replies
5/5iotests: add test for resizing a 'file' node below a 'raw' nodetests/qemu-iotests/tests/resize-below-raw tests/qemu-iotests/tests/resize-below-raw.out+58 -00 replies

Reviews trailers per patch

3 of 5 patches have a Reviewed-by or Acked-by.

PatchHanna Czenczek
1/5R-b
2/5R-b
3/5
4/5R-b
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

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

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
Signature · 1 line
2.47.2