qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/5] block: refresh filter parents when child was resized
@ 2025-09-17 11:54 Fiona Ebner
  2025-09-17 11:54 ` [PATCH v2 1/5] include/block/block_int-common: document when resize callback is used Fiona Ebner
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Fiona Ebner @ 2025-09-17 11:54 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-block, fam, stefanha, hreitz, kwolf

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




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-09-17 11:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-17 11:54 [PATCH v2 0/5] block: refresh filter parents when child was resized Fiona Ebner
2025-09-17 11:54 ` [PATCH v2 1/5] include/block/block_int-common: document when resize callback is used Fiona Ebner
2025-09-17 11:54 ` [PATCH v2 2/5] block: make bdrv_co_parent_cb_resize() a proper IO API function Fiona Ebner
2025-09-17 11:54 ` [PATCH v2 3/5] block: implement 'resize' callback for child_of_bds class Fiona Ebner
2025-09-17 11:54 ` [PATCH v2 4/5] iotests: add test for resizing a node below filters Fiona Ebner
2025-09-17 11:54 ` [PATCH v2 5/5] iotests: add test for resizing a 'file' node below a 'raw' node Fiona Ebner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).