[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/7] jobs: canonize Error object
From: |
Max Reitz |
Subject: |
Re: [Qemu-devel] [PATCH 2/7] jobs: canonize Error object |
Date: |
Wed, 22 Aug 2018 13:11:08 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
On 2018-08-17 21:04, John Snow wrote:
> Jobs presently use both an Error object in the case of the create job,
> and char strings in the case of generic errors elsewhere.
>
> Unify the two paths as just j->err, and remove the extra argument from
> job_completed. The integer error code for job_completed is kept for now
> for use by pre-emptive cancellation.
>
> Signed-off-by: John Snow <address@hidden>
> ---
> block/backup.c | 2 +-
> block/commit.c | 2 +-
> block/create.c | 5 ++---
> block/mirror.c | 2 +-
> block/stream.c | 2 +-
> include/qemu/job.h | 10 ++++------
> job-qmp.c | 5 +++--
> job.c | 19 ++++++-------------
> tests/test-bdrv-drain.c | 2 +-
> tests/test-blockjob-txn.c | 2 +-
> tests/test-blockjob.c | 2 +-
> 11 files changed, 22 insertions(+), 31 deletions(-)
(Accidentally deleted this part from my first reply)
> diff --git a/job.c b/job.c
> index 898260b2b3..c9de1af556 100644
> --- a/job.c
> +++ b/job.c
[...]
> @@ -535,7 +535,6 @@ void job_drain(Job *job)
> }
> }
>
> -
> /**
> * All jobs must allow a pause point before entering their job proper. This
> * ensures that jobs can be paused prior to being started, then resumed
> later.
If anything, you should remove one empty line after this function. ;-)
Max
signature.asc
Description: OpenPGP digital signature
[Qemu-devel] [PATCH 7/7] jobs: remove job_defer_to_main_loop, John Snow, 2018/08/17
[Qemu-devel] [PATCH 5/7] block/mirror: utilize job_exit shim, John Snow, 2018/08/17
- Re: [Qemu-devel] [PATCH 5/7] block/mirror: utilize job_exit shim, Max Reitz, 2018/08/22
- Re: [Qemu-devel] [PATCH 5/7] block/mirror: utilize job_exit shim, Max Reitz, 2018/08/22
- Re: [Qemu-devel] [PATCH 5/7] block/mirror: utilize job_exit shim, John Snow, 2018/08/22
- Re: [Qemu-devel] [PATCH 5/7] block/mirror: utilize job_exit shim, Max Reitz, 2018/08/25
- Re: [Qemu-devel] [PATCH 5/7] block/mirror: utilize job_exit shim, Max Reitz, 2018/08/25
- Re: [Qemu-devel] [PATCH 5/7] block/mirror: utilize job_exit shim, John Snow, 2018/08/28
- Re: [Qemu-devel] [PATCH 5/7] block/mirror: utilize job_exit shim, Max Reitz, 2018/08/29