[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH 35/42] job: Add job_is_ready()
From: |
Max Reitz |
Subject: |
Re: [Qemu-block] [PATCH 35/42] job: Add job_is_ready() |
Date: |
Mon, 14 May 2018 23:11:56 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 |
On 2018-05-09 18:26, Kevin Wolf wrote:
> Instead of having a 'bool ready' in BlockJob, add a function that
> derives its value from the job status.
>
> At the same time, this fixes the behaviour to match what the QAPI
> documentation promises for query-block-job: 'true if the job may be
> completed'. When the ready flag was introduced in commit ef6dbf1e46e,
> the flag never had to be reset to match the description because after
> being ready, the jobs would immediately complete and disappear.
>
> Job transactions and manual job finalisation were introduced only later.
> With these changes, jobs may stay around even after having completed
> (and they are not ready to be completed a second time), however their
> patches forgot to reset the ready flag.
>
> Signed-off-by: Kevin Wolf <address@hidden>
> ---
> include/block/blockjob.h | 5 -----
> include/qemu/job.h | 3 +++
> blockjob.c | 3 +--
> job.c | 22 ++++++++++++++++++++++
> qemu-img.c | 2 +-
> tests/test-blockjob.c | 2 +-
> 6 files changed, 28 insertions(+), 9 deletions(-)
Reviewed-by: Max Reitz <address@hidden>
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-block] [PATCH 34/42] job: Add job_dismiss(), (continued)
- [Qemu-block] [PATCH 36/42] job: Add job_transition_to_ready(), Kevin Wolf, 2018/05/09
- [Qemu-block] [PATCH 35/42] job: Add job_is_ready(), Kevin Wolf, 2018/05/09
- Re: [Qemu-block] [PATCH 35/42] job: Add job_is_ready(),
Max Reitz <=
- [Qemu-block] [PATCH 37/42] job: Move progress fields to Job, Kevin Wolf, 2018/05/09
- [Qemu-block] [PATCH 39/42] job: Add lifecycle QMP commands, Kevin Wolf, 2018/05/09
[Qemu-block] [PATCH 40/42] job: Add query-jobs QMP command, Kevin Wolf, 2018/05/09