[PATCH 0/4] block: copy-before-write: cbw-timeout

Vladimir Sementsov-Ogievskiy posted 4 patches 2 years, 2 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20220302162442.2052461-1-vsementsov@virtuozzo.com
Maintainers: John Snow <jsnow@redhat.com>, Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>, Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>, Stefan Hajnoczi <stefanha@redhat.com>, Markus Armbruster <armbru@redhat.com>, Eric Blake <eblake@redhat.com>
qapi/block-core.json                          |  5 +-
include/block/block-copy.h                    |  2 +-
include/qemu/coroutine.h                      | 13 +++
block/block-copy.c                            | 28 ++++--
block/copy-before-write.c                     |  6 +-
util/qemu-co-timeout.c                        | 89 +++++++++++++++++++
tests/qemu-iotests/tests/copy-before-write    | 78 ++++++++++++++++
.../qemu-iotests/tests/copy-before-write.out  |  4 +-
util/meson.build                              |  1 +
9 files changed, 213 insertions(+), 13 deletions(-)
create mode 100644 util/qemu-co-timeout.c
[PATCH 0/4] block: copy-before-write: cbw-timeout
Posted by Vladimir Sementsov-Ogievskiy 2 years, 2 months ago
Hi all!

There is another new option, that 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.

Based-on: <20220301205929.2006041-1-vsementsov@virtuozzo.com>
   ([PATCH 0/3] block: copy-before-write: on-cbw-error behavior)

Vladimir Sementsov-Ogievskiy (4):
  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                          |  5 +-
 include/block/block-copy.h                    |  2 +-
 include/qemu/coroutine.h                      | 13 +++
 block/block-copy.c                            | 28 ++++--
 block/copy-before-write.c                     |  6 +-
 util/qemu-co-timeout.c                        | 89 +++++++++++++++++++
 tests/qemu-iotests/tests/copy-before-write    | 78 ++++++++++++++++
 .../qemu-iotests/tests/copy-before-write.out  |  4 +-
 util/meson.build                              |  1 +
 9 files changed, 213 insertions(+), 13 deletions(-)
 create mode 100644 util/qemu-co-timeout.c

-- 
2.31.1