qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4 3/7] block: Replace in_use with operation blo


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v4 3/7] block: Replace in_use with operation blocker
Date: Mon, 25 Nov 2013 18:11:14 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130923 Thunderbird/17.0.9

Il 22/11/2013 06:24, Fam Zheng ha scritto:
> @@ -41,13 +41,11 @@ void *block_job_create(const BlockJobDriver *driver, 
> BlockDriverState *bs,
>  {
>      BlockJob *job;
>  
> -    if (bs->job || bdrv_in_use(bs)) {
> +    if (bs->job) {
>          error_set(errp, QERR_DEVICE_IN_USE, bdrv_get_device_name(bs));
>          return NULL;
>      }
>      bdrv_ref(bs);

Why is this check disappearing?

Perhaps a previous patch should hoist the in_use check to the callers of
block_job_create, and here you should just have an assertion that
bs->job == NULL.  Then this patch can change the checks to the
appropriate op.

Paolo



reply via email to

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