Skip to content

copy-before-write: on-cbw-error and cbw-timeout

Vladimir Sementsov-Ogievskiy qemu-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest7 patches 7 repliesIn review
  2. v37 patches 7 repliesSuperseded
  3. v27 patches 18 repliesSuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7block/copy-before-write: refactor option parsingblock/copy-before-write.c+29 -270 replies
2/7block/copy-before-write: add on-cbw-error open parameterblock/copy-before-write.c qapi/block-core.json+54 -30 replies
3/7iotests: add copy-before-write: on-cbw-error teststests/qemu-iotests/pylintrc tests/qemu-iotests/tests/copy-before-write tests/qemu-iotests/tests/copy-before-write.out+142 -02 replies
4/7util: add qemu-co-timeoutinclude/qemu/coroutine.h util/meson.build util/qemu-co-timeout.c+103 -00 replies
5/7block/block-copy: block_copy(): add timeout_ns parameterblock/block-copy.c block/copy-before-write.c include/block/block-copy.h+30 -90 replies
6/7block/copy-before-write: implement cbw-timeout optionblock/copy-before-write.c qapi/block-core.json+29 -21 reply
7/7iotests: copy-before-write: add cases for cbw-timeout optiontests/qemu-iotests/tests/copy-before-write tests/qemu-iotests/tests/copy-before-write.out+83 -21 reply

Reviews trailers per patch

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

PatchHanna Reitz
1/7R-b
2/7R-b
3/7R-b
4/7R-b
5/7R-b
6/7R-b
7/7R-b

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

Read the v4 thread

Cover letter [PATCH v4 0/7] copy-before-write: on-cbw-error and cbw-timeout

Hi all!

v4: Now based on master
01: add assertion and r-b
02: s/7.0/7.1/ and r-b
03: switch to QEMUMachine, touch-up pylintrc, drop r-b 04,05,06: add r-b
07: switch to QEMUMachine

Here are two new options for copy-before-write filter:

on-cbw-error allows to alter the behavior on copy-before-write operation
failure: not break guest write but break the snapshot (and therefore backup process)

cbw-timeout allows to limit cbw operation by some timeout.

So, for example, using cbw-timeout=60 and on-cbw-error=break-snapshot you can be sure that guest write will not stuck for more than 60 seconds and will never fail due to backup problems.

Vladimir Sementsov-Ogievskiy (7):
block/copy-before-write: refactor option parsing block/copy-before-write: add on-cbw-error open parameter
iotests: add copy-before-write: on-cbw-error tests
util: add qemu-co-timeout
block/block-copy: block_copy(): add timeout_ns parameter block/copy-before-write: implement cbw-timeout option
iotests: copy-before-write: add cases for cbw-timeout option

 qapi/block-core.json                          |  31 ++-
 include/block/block-copy.h                    |   4 +-
 include/qemu/coroutine.h                      |  13 ++
 block/block-copy.c                            |  33 ++-
 block/copy-before-write.c                     | 111 ++++++---
 util/qemu-co-timeout.c                        |  89 ++++++++
 tests/qemu-iotests/pylintrc                   |   5 +
 tests/qemu-iotests/tests/copy-before-write    | 213 ++++++++++++++++++
 .../qemu-iotests/tests/copy-before-write.out  |   5 +
 util/meson.build                              |   1 +
 10 files changed, 466 insertions(+), 39 deletions(-)
 create mode 100644 util/qemu-co-timeout.c
 create mode 100755 tests/qemu-iotests/tests/copy-before-write
 create mode 100644 tests/qemu-iotests/tests/copy-before-write.out
Signature · 1 line
2.35.1