On 21.04.21 09:58, Vladimir Sementsov-Ogievskiy wrote:
If mirror is READY than cancel operation is not discarding the whole
result of the operation, but instead it's a documented way get a
point-in-time snapshot of source disk.

So, we should not cancel any requests if mirror is READ and
force=false. Let's fix that case.

Note, that bug that we have before this commit is not critical, as the
only .bdrv_cancel_in_flight implementation is nbd_cancel_in_flight()
and it cancels only requests waiting for reconnection, so it should be
rare case.

Fixes: 521ff8b779b11c394dbdc43f02e158dd99df308a
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com>
---
  include/block/block_int.h | 2 +-
  include/qemu/job.h        | 2 +-
  block/backup.c            | 2 +-
  block/mirror.c            | 6 ++++--
  job.c                     | 2 +-
  tests/qemu-iotests/264    | 2 +-
  6 files changed, 9 insertions(+), 7 deletions(-)

Thanks, applied to my block branch:

https://github.com/XanClic/qemu/commits/block

Max


Reply via email to