mbox series

[v2,0/7] block: Relax restrictions for blockdev-snapshot

Message ID 20200310113831.27293-1-kwolf@redhat.com (mailing list archive)
Headers show
Series block: Relax restrictions for blockdev-snapshot | expand

Message

Kevin Wolf March 10, 2020, 11:38 a.m. UTC
This series allows libvirt to fix a regression that its switch from
drive-mirror to blockdev-mirror caused: It currently requires that the
backing chain of the target image is already available when the mirror
operation is started.

In reality, the backing chain may only be copied while the operation is
in progress, so the backing file of the target image needs to stay
disabled until the operation completes and should be attached only at
that point. Without this series, we don't have a supported API to attach
the backing file at that later point.

v2:
- Added a fix and test case for iothreads [Peter]
- Added a blockdev-snapshot feature flag to indicate that it's usable
  for attaching a backing chain to an overlay that is already in
  write-only use (e.g. as a mirror target) [Peter]

Kevin Wolf (6):
  block: Make bdrv_get_cumulative_perm() public
  block: Relax restrictions for blockdev-snapshot
  iotests: Fix run_job() with use_log=False
  iotests: Test mirror with temporarily disabled target backing file
  block: Fix cross-AioContext blockdev-snapshot
  iotests: Add iothread cases to 155

Peter Krempa (1):
  qapi: Add '@allow-write-only-overlay' feature for 'blockdev-snapshot'

 qapi/block-core.json          |  9 +++-
 include/block/block_int.h     |  3 ++
 block.c                       |  7 ++-
 blockdev.c                    | 30 ++++--------
 tests/qemu-iotests/iotests.py |  5 +-
 tests/qemu-iotests/085.out    |  4 +-
 tests/qemu-iotests/155        | 88 +++++++++++++++++++++++++++++------
 tests/qemu-iotests/155.out    |  4 +-
 8 files changed, 104 insertions(+), 46 deletions(-)

Comments

Kevin Wolf March 10, 2020, 5:43 p.m. UTC | #1
Am 10.03.2020 um 12:38 hat Kevin Wolf geschrieben:
> This series allows libvirt to fix a regression that its switch from
> drive-mirror to blockdev-mirror caused: It currently requires that the
> backing chain of the target image is already available when the mirror
> operation is started.
> 
> In reality, the backing chain may only be copied while the operation is
> in progress, so the backing file of the target image needs to stay
> disabled until the operation completes and should be attached only at
> that point. Without this series, we don't have a supported API to attach
> the backing file at that later point.
> 
> v2:
> - Added a fix and test case for iothreads [Peter]
> - Added a blockdev-snapshot feature flag to indicate that it's usable
>   for attaching a backing chain to an overlay that is already in
>   write-only use (e.g. as a mirror target) [Peter]

Thanks for review and testing, applied to the block branch.

Kevin