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