mbox series

[for-6.1?,v2,0/7] mirror: Handle errors after READY cancel

Message ID 20210726144613.954844-1-mreitz@redhat.com (mailing list archive)
Headers show
Series mirror: Handle errors after READY cancel | expand

Message

Max Reitz July 26, 2021, 2:46 p.m. UTC
Hi,

v1 cover letter:
https://lists.nongnu.org/archive/html/qemu-block/2021-07/msg00705.html

Changes in v2:
- Added patch 2 (as suggested by Vladimir)
- Patch 4 (ex. 3): Rebase conflicts because of patch 2
- Patch 5 (ex. 4):
  - Rebase conflicts because of patch 2
  - Do not use job_cancel_requested() to determine how a soft-cancelled
    job should be completed: A soft-cancelled job should end with
    COMPLETED, not CANCELLED, and so job_is_cancelled() is the
    appropriate condition there.


git-backport-diff against v1:

Key:
[----] : patches are identical
[####] : number of functional differences between upstream/downstream patch
[down] : patch is downstream-only
The flags [FC] indicate (F)unctional and (C)ontextual differences, respectively

001/7:[----] [--] 'mirror: Keep s->synced on error'
002/7:[down] 'mirror: Drop s->synced'
003/7:[----] [--] 'job: @force parameter for job_cancel_sync{,_all}()'
004/7:[0006] [FC] 'jobs: Give Job.force_cancel more meaning'
005/7:[0011] [FC] 'job: Add job_cancel_requested()'
006/7:[----] [-C] 'mirror: Check job_is_cancelled() earlier'
007/7:[----] [--] 'iotests: Add mirror-ready-cancel-error test'


Max Reitz (7):
  mirror: Keep s->synced on error
  mirror: Drop s->synced
  job: @force parameter for job_cancel_sync{,_all}()
  jobs: Give Job.force_cancel more meaning
  job: Add job_cancel_requested()
  mirror: Check job_is_cancelled() earlier
  iotests: Add mirror-ready-cancel-error test

 include/qemu/job.h                            |  29 +++-
 block/backup.c                                |   3 +-
 block/mirror.c                                |  47 +++---
 block/replication.c                           |   4 +-
 blockdev.c                                    |   4 +-
 job.c                                         |  40 ++++-
 qemu-nbd.c                                    |   2 +-
 softmmu/runstate.c                            |   2 +-
 storage-daemon/qemu-storage-daemon.c          |   2 +-
 tests/unit/test-block-iothread.c              |   2 +-
 tests/unit/test-blockjob.c                    |   2 +-
 tests/qemu-iotests/109.out                    |  60 +++-----
 .../tests/mirror-ready-cancel-error           | 143 ++++++++++++++++++
 .../tests/mirror-ready-cancel-error.out       |   5 +
 tests/qemu-iotests/tests/qsd-jobs.out         |   2 +-
 15 files changed, 264 insertions(+), 83 deletions(-)
 create mode 100755 tests/qemu-iotests/tests/mirror-ready-cancel-error
 create mode 100644 tests/qemu-iotests/tests/mirror-ready-cancel-error.out

Comments

Kevin Wolf Aug. 3, 2021, 2:36 p.m. UTC | #1
Am 26.07.2021 um 16:46 hat Max Reitz geschrieben:
> Hi,
> 
> v1 cover letter:
> https://lists.nongnu.org/archive/html/qemu-block/2021-07/msg00705.html
> 
> Changes in v2:
> - Added patch 2 (as suggested by Vladimir)
> - Patch 4 (ex. 3): Rebase conflicts because of patch 2
> - Patch 5 (ex. 4):
>   - Rebase conflicts because of patch 2
>   - Do not use job_cancel_requested() to determine how a soft-cancelled
>     job should be completed: A soft-cancelled job should end with
>     COMPLETED, not CANCELLED, and so job_is_cancelled() is the
>     appropriate condition there.

Patches 1-4, preferably with the unrelated hunk split out from 3:

Reviewed-by: Kevin Wolf <kwolf@redhat.com>