From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
To: Max Reitz <mreitz@redhat.com>, qemu-block@nongnu.org
Cc: qemu-devel@nongnu.org, Kevin Wolf <kwolf@redhat.com>,
John Snow <jsnow@redhat.com>
Subject: Re: [PATCH for-6.1? 4/6] job: Add job_cancel_requested()
Date: Tue, 27 Jul 2021 17:47:12 +0300 [thread overview]
Message-ID: <bd4d225d-0bcd-9a38-9813-af229d8fbe4f@virtuozzo.com> (raw)
In-Reply-To: <32463d65-834c-64ba-aab4-36f1810ddb43@redhat.com>
26.07.2021 10:09, Max Reitz wrote:
>
>>> job->ret = -ECANCELED;
>>> }
>>> if (job->ret) {
>>> @@ -704,7 +709,7 @@ static int job_finalize_single(Job *job)
>>> /* Emit events only if we actually started */
>>> if (job_started(job)) {
>>> - if (job_is_cancelled(job)) {
>>> + if (job_cancel_requested(job)) {
>>> job_event_cancelled(job);
>>
>> Same question here.. Shouldn't mirror report COMPLETED event in case of not-force cancelled in READY state?
>
> Same here, I thought this is user-visible, nothing internal, so I should leave it as-is.
>
> Now I see that cancelling mirror post-READY indeed should result in a COMPLETED event. So I’m actually not exactly sure how mirror does that, despite this code here
Hmm. Now looking at mirror code, I see that it does "s->common.job.cancelled = false"
--
Best regards,
Vladimir
next prev parent reply other threads:[~2021-07-27 14:48 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-22 12:26 [PATCH for-6.1? 0/6] mirror: Handle errors after READY cancel Max Reitz
2021-07-22 12:26 ` [PATCH for-6.1? 1/6] mirror: Keep s->synced on error Max Reitz
2021-07-22 16:25 ` Vladimir Sementsov-Ogievskiy
2021-07-26 7:11 ` Max Reitz
2021-07-26 10:24 ` Vladimir Sementsov-Ogievskiy
2021-07-22 12:26 ` [PATCH for-6.1? 2/6] job: @force parameter for job_cancel_sync{, _all}() Max Reitz
2021-07-22 17:00 ` [PATCH for-6.1? 2/6] job: @force parameter for job_cancel_sync{,_all}() Vladimir Sementsov-Ogievskiy
2021-07-22 12:26 ` [PATCH for-6.1? 3/6] jobs: Give Job.force_cancel more meaning Max Reitz
2021-07-22 18:16 ` Vladimir Sementsov-Ogievskiy
2021-07-22 12:26 ` [PATCH for-6.1? 4/6] job: Add job_cancel_requested() Max Reitz
2021-07-22 17:58 ` Vladimir Sementsov-Ogievskiy
2021-07-26 7:09 ` Max Reitz
2021-07-27 14:47 ` Vladimir Sementsov-Ogievskiy [this message]
2021-07-27 15:30 ` Max Reitz
2021-07-22 12:26 ` [PATCH for-6.1? 5/6] mirror: Check job_is_cancelled() earlier Max Reitz
2021-07-22 12:26 ` [PATCH for-6.1? 6/6] iotests: Add mirror-ready-cancel-error test Max Reitz
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=bd4d225d-0bcd-9a38-9813-af229d8fbe4f@virtuozzo.com \
--to=vsementsov@virtuozzo.com \
--cc=jsnow@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@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).