qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Hanna Reitz <hreitz@redhat.com>
To: qemu-block@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>,
	Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
	Eric Blake <eblake@redhat.com>,
	qemu-devel@nongnu.org
Subject: [PATCH v4 00/12] mirror: Handle errors after READY cancel
Date: Tue,  7 Sep 2021 14:42:33 +0200	[thread overview]
Message-ID: <20210907124245.143492-1-hreitz@redhat.com> (raw)

Hi,

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

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

v3 cover letter:
https://lists.nongnu.org/archive/html/qemu-block/2021-08/msg00127.html


Changes in v4:
- Patch 1: Swap the order of aio_context_acquire() and job_unref() to
  save ourselves from using a local variable here (i.e. do it the same
  way as job_txn_apply())

- Patch 5:
  - Do not add a @force parameter to job_cancel_sync_all(): All callers
    want to force-cancel all jobs when they use this function, because
    what else would you want to do when you want to “cancel all jobs”.
    So we don’t need a @force parameter here, and can unconditionally
    invoke job_cancel_sync() with force=true.

  - Let the replication block driver force-cancel its backup job
    (because it doesn’t make a difference, but it’s cleaner to
    force-cancel jobs that don’t support any other cancellation
    method).


git-backport-diff against v3:

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/12:[0003] [FC] 'job: Context changes in job_completed_txn_abort()'
002/12:[----] [--] 'mirror: Keep s->synced on error'
003/12:[----] [--] 'mirror: Drop s->synced'
004/12:[----] [--] 'job: Force-cancel jobs in a failed transaction'
005/12:[0022] [FC] 'job: @force parameter for job_cancel_sync()'
006/12:[----] [--] 'jobs: Give Job.force_cancel more meaning'
007/12:[----] [--] 'job: Add job_cancel_requested()'
008/12:[----] [--] 'mirror: Use job_is_cancelled()'
009/12:[----] [--] 'mirror: Check job_is_cancelled() earlier'
010/12:[----] [--] 'mirror: Stop active mirroring after force-cancel'
011/12:[----] [--] 'mirror: Do not clear .cancelled'
012/12:[----] [--] 'iotests: Add mirror-ready-cancel-error test'


Hanna Reitz (12):
  job: Context changes in job_completed_txn_abort()
  mirror: Keep s->synced on error
  mirror: Drop s->synced
  job: Force-cancel jobs in a failed transaction
  job: @force parameter for job_cancel_sync()
  jobs: Give Job.force_cancel more meaning
  job: Add job_cancel_requested()
  mirror: Use job_is_cancelled()
  mirror: Check job_is_cancelled() earlier
  mirror: Stop active mirroring after force-cancel
  mirror: Do not clear .cancelled
  iotests: Add mirror-ready-cancel-error test

 include/qemu/job.h                            |  29 +++-
 block/backup.c                                |   3 +-
 block/mirror.c                                |  56 ++++---
 block/replication.c                           |   4 +-
 blockdev.c                                    |   4 +-
 job.c                                         |  64 ++++++--
 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 +-
 11 files changed, 286 insertions(+), 86 deletions(-)
 create mode 100755 tests/qemu-iotests/tests/mirror-ready-cancel-error
 create mode 100644 tests/qemu-iotests/tests/mirror-ready-cancel-error.out

-- 
2.31.1



             reply	other threads:[~2021-09-07 13:01 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-07 12:42 Hanna Reitz [this message]
2021-09-07 12:42 ` [PATCH v4 01/12] job: Context changes in job_completed_txn_abort() Hanna Reitz
2021-09-07 12:42 ` [PATCH v4 02/12] mirror: Keep s->synced on error Hanna Reitz
2021-09-07 12:42 ` [PATCH v4 03/12] mirror: Drop s->synced Hanna Reitz
2021-09-07 12:42 ` [PATCH v4 04/12] job: Force-cancel jobs in a failed transaction Hanna Reitz
2021-09-07 12:42 ` [PATCH v4 05/12] job: @force parameter for job_cancel_sync() Hanna Reitz
2021-09-08 16:20   ` Eric Blake
2021-09-08 16:33   ` Vladimir Sementsov-Ogievskiy
2021-09-14 17:20     ` Hanna Reitz
2021-09-15  7:07       ` Vladimir Sementsov-Ogievskiy
2021-09-07 12:42 ` [PATCH v4 06/12] jobs: Give Job.force_cancel more meaning Hanna Reitz
2021-09-07 12:42 ` [PATCH v4 07/12] job: Add job_cancel_requested() Hanna Reitz
2021-09-07 12:42 ` [PATCH v4 08/12] mirror: Use job_is_cancelled() Hanna Reitz
2021-09-07 12:42 ` [PATCH v4 09/12] mirror: Check job_is_cancelled() earlier Hanna Reitz
2021-09-07 12:42 ` [PATCH v4 10/12] mirror: Stop active mirroring after force-cancel Hanna Reitz
2021-09-07 12:42 ` [PATCH v4 11/12] mirror: Do not clear .cancelled Hanna Reitz
2021-09-07 12:42 ` [PATCH v4 12/12] iotests: Add mirror-ready-cancel-error test Hanna Reitz
2021-09-15  7:45 ` [PATCH v4 00/12] mirror: Handle errors after READY cancel Vladimir Sementsov-Ogievskiy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210907124245.143492-1-hreitz@redhat.com \
    --to=hreitz@redhat.com \
    --cc=eblake@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=vsementsov@virtuozzo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).