qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 4/4] block: drop bs->job


From: Vladimir Sementsov-Ogievskiy
Subject: Re: [Qemu-devel] [PATCH 4/4] block: drop bs->job
Date: Tue, 18 Jun 2019 06:53:01 +0000

17.06.2019 19:58, Kevin Wolf wrote:
> Am 06.06.2019 um 17:41 hat Vladimir Sementsov-Ogievskiy geschrieben:
>> Drop remaining users of bs->job:
>> 1. assertions actually duplicated by assert(!bs->refcnt)
>> 2. trace-point seems not enough reason to change stream_start to return
>>     BlockJob pointer
>> 3. Restricting creation of two jobs based on same bs is bad idea, as
>>     3.1 Some jobs creates filters to be their main node, so, this check
>>     don't actually prevent creating second job on same real node (which
>>     will create another filter node) (but I hope it is restricted by
>>     other mechanisms)
>>     3.2 Even without bs->job we have two systems of permissions:
>>     op-blockers and BLK_PERM
>>     3.3 We may want to run several jobs on one node one day
> 
> This made make check break (test-blockjob tests that you can't create
> two block jobs on the same node). So I need to squash in the following,
> if you agree.
> 
> Kevin
> 
> 
> diff --git a/tests/test-blockjob.c b/tests/test-blockjob.c
> index 8c91980c70..b33f899873 100644
> --- a/tests/test-blockjob.c
> +++ b/tests/test-blockjob.c
> @@ -122,8 +122,9 @@ static void test_job_ids(void)
>       /* This one is valid */
>       job[0] = do_test_id(blk[0], "id0", true);
> 
> -    /* We cannot have two jobs in the same BDS */
> -    do_test_id(blk[0], "id1", false);
> +    /* We can have two jobs in the same BDS */
> +    job[1] = do_test_id(blk[0], "id1", true);
> +    job_early_fail(&job[1]->job);
> 
>       /* Duplicate job IDs are not allowed */
>       job[1] = do_test_id(blk[1], "id0", false);
> 

I agree, thanks. Sorry for me always running only iotests and ignoring make 
check :(

-- 
Best regards,
Vladimir

reply via email to

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