[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 04/15] block: Simplify find_block_job() and m
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH v2 04/15] block: Simplify find_block_job() and make it accept a job ID |
Date: |
Wed, 22 Jun 2016 14:50:57 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Am 22.06.2016 um 14:25 hat Alberto Garcia geschrieben:
> find_block_job() looks for a block backend with a specified name,
> checks whether it has a block job and acquires its AioContext. This
> patch uses block_job_next() and iterate directly over the block jobs.
>
> In addition to that we want to identify jobs primarily by their ID, so
> this patch updates find_block_job() to allow IDs too. Only one of ID
> and device name can be specified when looking for a block job.
>
> Signed-off-by: Alberto Garcia <address@hidden>
Nice, this gets rid of another bs->job user.
But as I said in patch 2, it's better to leave out the device thing. We
can just update the documentation of the QMP commands so that 'device'
contains a job ID rather than a device name and then we can look up IDs
unconditionally. This will simplify the function even more.
Kevin
- [Qemu-devel] [PATCH v2 07/15] backup: Add 'job-id' parameter to 'blockdev-backup' and 'drive-backup', (continued)
- [Qemu-devel] [PATCH v2 07/15] backup: Add 'job-id' parameter to 'blockdev-backup' and 'drive-backup', Alberto Garcia, 2016/06/22
- [Qemu-devel] [PATCH v2 06/15] mirror: Add 'job-id' parameter to 'blockdev-mirror' and 'drive-mirror', Alberto Garcia, 2016/06/22
- [Qemu-devel] [PATCH v2 01/15] stream: Fix prototype of stream_start(), Alberto Garcia, 2016/06/22
- [Qemu-devel] [PATCH v2 08/15] stream: Add 'job-id' parameter to 'block-stream', Alberto Garcia, 2016/06/22
- [Qemu-devel] [PATCH v2 09/15] commit: Add 'job-id' parameter to 'block-commit', Alberto Garcia, 2016/06/22
- [Qemu-devel] [PATCH v2 02/15] blockjob: Decouple the ID from the device name in the BlockJob struct, Alberto Garcia, 2016/06/22
- [Qemu-devel] [PATCH v2 05/15] blockjob: Add 'job_id' parameter to block_job_create(), Alberto Garcia, 2016/06/22
- [Qemu-devel] [PATCH v2 04/15] block: Simplify find_block_job() and make it accept a job ID, Alberto Garcia, 2016/06/22
- Re: [Qemu-devel] [PATCH v2 04/15] block: Simplify find_block_job() and make it accept a job ID,
Kevin Wolf <=
- [Qemu-devel] [PATCH v2 10/15] blockjob: Add 'id' parameter to 'block-job-set-speed', Alberto Garcia, 2016/06/22
- [Qemu-devel] [PATCH v2 15/15] blockjob: Add 'id' field to 'BlockJobInfo' and all BLOCK_JOB_* events, Alberto Garcia, 2016/06/22
- [Qemu-devel] [PATCH v2 12/15] blockjob: Add 'id' parameter to 'block-job-pause', Alberto Garcia, 2016/06/22
- [Qemu-devel] [PATCH v2 13/15] blockjob: Add 'id' parameter to 'block-job-resume', Alberto Garcia, 2016/06/22
- [Qemu-devel] [PATCH v2 14/15] blockjob: Add 'id' parameter to 'block-job-complete', Alberto Garcia, 2016/06/22
- [Qemu-devel] [PATCH v2 11/15] blockjob: Add 'id' parameter to 'block-job-cancel', Alberto Garcia, 2016/06/22