qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 03/15] blockjob: Add block_job_get()


From: Max Reitz
Subject: Re: [Qemu-devel] [PATCH 03/15] blockjob: Add block_job_get()
Date: Mon, 20 Jun 2016 18:24:30 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1

On 09.06.2016 10:20, Alberto Garcia wrote:
> Currently the way to look for a specific block job is to iterate the
> list manually using block_job_next().
> 
> Since we want to be able to identify a job primarily by its ID it
> makes sense to have a function that does just that.
> 
> Signed-off-by: Alberto Garcia <address@hidden>
> ---
>  blockjob.c               | 13 +++++++++++++
>  include/block/blockjob.h | 10 ++++++++++
>  2 files changed, 23 insertions(+)

Reviewed-by: Max Reitz <address@hidden>

Just to throw out a suggestion, I'm not sure how useful it will be after
the rest of the series:

Would it make sense to prevent name clashes between block job IDs and
device IDs (i.e. BlockBackend names)? If we did that, this function
could be used to identify a block job both based on its name and its device.

Just a suggestion, though, I don't think it will be necessary. Legacy
applications will always create jobs with auto-generated IDs that cannot
clash with BB names anyway. If we require applications that do name
their block jobs manually to always use this ID when specifying a block
job, everything will be fine even if block job and BB names do clash.

Max

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]