[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 6/9] jobs: utilize job_exit shim
From: |
Max Reitz |
Subject: |
Re: [Qemu-devel] [PATCH v2 6/9] jobs: utilize job_exit shim |
Date: |
Mon, 27 Aug 2018 12:37:18 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
On 2018-08-24 00:08, John Snow wrote:
> Utilize the job_exit shim by not calling job_defer_to_main_loop, and
> where applicable, converting the deferred callback into the job_exit
> callback.
>
> This converts backup, stream, create, and the unit tests all at once.
> Most of these jobs do not see any changes to the order in which they
> clean up their resources, except the test-blockjob-txn test, which
> now puts down its bs before job_completed is called.
>
> This is safe for the same reason the reordering in the mirror job is
> safe, because job_completed no longer runs under two locks, making
> the unref safe even if it causes a flush.
>
> Signed-off-by: John Snow <address@hidden>
> ---
> block/backup.c | 16 ----------------
> block/create.c | 14 +++-----------
> block/stream.c | 22 +++++++---------------
> tests/test-bdrv-drain.c | 6 ------
> tests/test-blockjob-txn.c | 11 ++---------
> tests/test-blockjob.c | 10 ++++------
> 6 files changed, 16 insertions(+), 63 deletions(-)
Reviewed-by: Max Reitz <address@hidden>
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH v2 8/9] jobs: remove ret argument to job_completed; privatize it, (continued)
- [Qemu-devel] [PATCH v2 2/9] jobs: canonize Error object, John Snow, 2018/08/23
- [Qemu-devel] [PATCH v2 7/9] block/backup: make function variables consistently named, John Snow, 2018/08/23
- [Qemu-devel] [PATCH v2 5/9] block/mirror: utilize job_exit shim, John Snow, 2018/08/23
- [Qemu-devel] [PATCH v2 6/9] jobs: utilize job_exit shim, John Snow, 2018/08/23
- Re: [Qemu-devel] [PATCH v2 6/9] jobs: utilize job_exit shim,
Max Reitz <=
- [Qemu-devel] [PATCH v2 9/9] jobs: remove job_defer_to_main_loop, John Snow, 2018/08/23
- [Qemu-devel] [PATCH v2 4/9] block/commit: utilize job_exit shim, John Snow, 2018/08/23
- [Qemu-devel] [PATCH v2 1/9] jobs: change start callback to run callback, John Snow, 2018/08/23
- [Qemu-devel] [PATCH v2 3/9] jobs: add exit shim, John Snow, 2018/08/23