Skip to content

block/mirror: Do not wait for active writes

Hanna Reitz qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5block/mirror: Do not wait for active writesblock/mirror.c+30 -71 reply
2/5block/mirror: Drop mirror_wait_for_any_operation()block/mirror.c+8 -131 reply
3/5block/mirror: Fix NULL s->job in active writesblock/mirror.c+12 -82 replies
4/5iotests/151: Test that active mirror progressestests/qemu-iotests/151 tests/qemu-iotests/151.out+181 -31 reply
5/5iotests/151: Test active requests on mirror starttests/qemu-iotests/151 tests/qemu-iotests/151.out+52 -51 reply

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by.

PatchKevin Wolf
1/5R-b
2/5R-b
3/5R-b
4/5R-b
5/5R-b

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

Read the v1 thread

Cover letter [PATCH for-7.2 0/5] block/mirror: Do not wait for active writes

Hi,

For some reason(TM), the mirror job, when in write-blocking mode, has decided not to issue background requests while active writes are in flight. (Or rather, it was probably me who decided that.)

The problem is that only background requests can really reliably help you make progress. When all the mirror job does is to mirror guest writes to the target, but not copy anything else that remains to be copied in the disk, it will not make converge.

It is unclear why it is that way, so patch 1 simply drops that dependency, and attempts to better explain the remaining wait-dependencies we have between requests (i.e. why active requests must wait on all overlapping requests for the whole range, but background requests only wait on any conflicts that concern the beginning of the range they want to copy).

Patch 2 is clean-up, patch 3 fixes another bug I found while trying to come up with a working test case.

Patch 4 is that test case (I hope it works on your end, too), and patch 5 is a test case for the fix in patch 3.

Hanna Reitz (5):
block/mirror: Do not wait for active writes block/mirror: Drop mirror_wait_for_any_operation() block/mirror: Fix NULL s->job in active writes iotests/151: Test that active mirror progresses iotests/151: Test active requests on mirror start

 block/mirror.c             |  78 ++++++++-----
 tests/qemu-iotests/151     | 227 ++++++++++++++++++++++++++++++++++++-
 tests/qemu-iotests/151.out |   4 +-
 3 files changed, 278 insertions(+), 31 deletions(-)
Signature · 1 line
2.36.1