qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
To: Hanna Reitz <hreitz@redhat.com>, qemu-block@nongnu.org
Cc: qemu-devel@nongnu.org, Eric Blake <eblake@redhat.com>,
	Kevin Wolf <kwolf@redhat.com>
Subject: Re: [PATCH v5 00/13] mirror: Handle errors after READY cancel
Date: Thu, 7 Oct 2021 11:39:31 +0300	[thread overview]
Message-ID: <18fc52fb-7749-960d-371a-a9291989373f@virtuozzo.com> (raw)
In-Reply-To: <20211006151940.214590-1-hreitz@redhat.com>

10/6/21 18:19, Hanna Reitz wrote:
> 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
> 
> v4 cover letter:
> https://lists.nongnu.org/archive/html/qemu-block/2021-09/msg00314.html
> 
> 
> Changes in v5:
> - Added patch 7: When it was soft-cancelled, the mirror job clears
>    .cancelled before leaving its main loop.  The clear intention is to
>    have the job be treated as having completed successfully (and this is
>    also supported by the QMP documentation of block-job-cancel).  It is
>    however possible to cancel the job after it has left its main loop,
>    before it can be unwound, and then the job would again be treated as
>    cancelled.  We don’t want that, so make a soft job-cancel a no-op when
>    .deferred_to_main_loop is true.
>    (This fixes the test-replication failure.)
> 
> - Patch 8: Add a comment in job_cancel() that job_cancel_requested() and
>    job_is_cancelled() are equivalent here, but why we want to inquire
>    job_is_cancelled() instead of job_cancel_requested().
> 
> 
> git-backport-diff against v4:
> 
> 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/13:[----] [--] 'job: Context changes in job_completed_txn_abort()'
> 002/13:[----] [--] 'mirror: Keep s->synced on error'
> 003/13:[----] [--] 'mirror: Drop s->synced'
> 004/13:[----] [--] 'job: Force-cancel jobs in a failed transaction'
> 005/13:[----] [--] 'job: @force parameter for job_cancel_sync()'
> 006/13:[----] [--] 'jobs: Give Job.force_cancel more meaning'
> 007/13:[down] 'job: Do not soft-cancel after a job is done'
> 008/13:[0005] [FC] 'job: Add job_cancel_requested()'
> 009/13:[----] [--] 'mirror: Use job_is_cancelled()'
> 010/13:[----] [--] 'mirror: Check job_is_cancelled() earlier'
> 011/13:[----] [--] 'mirror: Stop active mirroring after force-cancel'
> 012/13:[----] [--] 'mirror: Do not clear .cancelled'
> 013/13:[----] [--] 'iotests: Add mirror-ready-cancel-error test'
> 
> 
> Hanna Reitz (13):
>    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: Do not soft-cancel after a job is done
>    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                                         |  94 ++++++++++--
>   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, 312 insertions(+), 90 deletions(-)
>   create mode 100755 tests/qemu-iotests/tests/mirror-ready-cancel-error
>   create mode 100644 tests/qemu-iotests/tests/mirror-ready-cancel-error.out
> 

Thanks, applied to my jobs branch.

-- 
Best regards,
Vladimir


      parent reply	other threads:[~2021-10-07  8:41 UTC|newest]

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

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=18fc52fb-7749-960d-371a-a9291989373f@virtuozzo.com \
    --to=vsementsov@virtuozzo.com \
    --cc=eblake@redhat.com \
    --cc=hreitz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /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).