All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/7] copy-before-write: on-cbw-error and cbw-timeout
@ 2022-04-06 18:07 Vladimir Sementsov-Ogievskiy
  2022-04-06 18:07 ` [PATCH v3 1/7] block/copy-before-write: refactor option parsing Vladimir Sementsov-Ogievskiy
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2022-04-06 18:07 UTC (permalink / raw)
  To: qemu-block
  Cc: kwolf, v.sementsov-og, jsnow, qemu-devel, armbru, hreitz,
	vsementsov, stefanha, eblake

Hi all!

v3:
01: refactor options parsing
02: - wording, grammar
    - early return from cbw_do_copy_before_write() when snapshot_error is set
    - drop premature optimization around waiting for in-flight requests when
      we set snapshot_error
03: Hanna's r-b
05: - add callback to block_copy() interface
    - add forgotten g_free(call_state)
    - do cancel block-copy call on timeout
06: - wording
    - increase in_flight for block_copy(), to handle timed-out block_copy()
      on drain
07: - less strict limit for bps-write, as now we honestly wait for cancelled
      block-copy call on final drain


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.

Based-on: <20220406153202.332186-1-vsementsov@openvz.org>
  ( [PATCH for-7.1 0/2] throttle-groups: use QEMU_CLOCK_REALTIME )

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                     | 110 +++++++---
 util/qemu-co-timeout.c                        |  89 ++++++++
 tests/qemu-iotests/tests/copy-before-write    | 206 ++++++++++++++++++
 .../qemu-iotests/tests/copy-before-write.out  |   5 +
 util/meson.build                              |   1 +
 9 files changed, 453 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

-- 
2.35.1



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

end of thread, other threads:[~2022-04-07 10:57 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-06 18:07 [PATCH v3 0/7] copy-before-write: on-cbw-error and cbw-timeout Vladimir Sementsov-Ogievskiy
2022-04-06 18:07 ` [PATCH v3 1/7] block/copy-before-write: refactor option parsing Vladimir Sementsov-Ogievskiy
2022-04-07  7:08   ` Hanna Reitz
2022-04-06 18:07 ` [PATCH v3 2/7] block/copy-before-write: add on-cbw-error open parameter Vladimir Sementsov-Ogievskiy
2022-04-07  8:22   ` Hanna Reitz
2022-04-06 18:07 ` [PATCH v3 3/7] iotests: add copy-before-write: on-cbw-error tests Vladimir Sementsov-Ogievskiy
2022-04-06 18:07 ` [PATCH v3 4/7] util: add qemu-co-timeout Vladimir Sementsov-Ogievskiy
2022-04-07  9:20   ` Hanna Reitz
2022-04-06 18:07 ` [PATCH v3 5/7] block/block-copy: block_copy(): add timeout_ns parameter Vladimir Sementsov-Ogievskiy
2022-04-07  9:20   ` Hanna Reitz
2022-04-06 18:08 ` [PATCH v3 6/7] block/copy-before-write: implement cbw-timeout option Vladimir Sementsov-Ogievskiy
2022-04-07  9:20   ` Hanna Reitz
2022-04-06 18:08 ` [PATCH v3 7/7] iotests: copy-before-write: add cases for " Vladimir Sementsov-Ogievskiy
2022-04-07  9:19   ` Hanna Reitz
2022-04-07 10:54     ` Vladimir Sementsov-Ogievskiy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.