[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH 15/54] block: Involve block drivers in permissio
From: |
Max Reitz |
Subject: |
Re: [Qemu-block] [PATCH 15/54] block: Involve block drivers in permission granting |
Date: |
Mon, 27 Feb 2017 13:32:41 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 |
On 27.02.2017 13:28, Kevin Wolf wrote:
> Am 22.02.2017 um 15:04 hat Max Reitz geschrieben:
>>> @@ -1390,6 +1565,7 @@ BdrvChild *bdrv_root_attach_child(BlockDriverState
>>> *child_bs,
>>>
>>> ret = bdrv_check_update_perm(child_bs, perm, shared_perm, NULL, errp);
>>> if (ret < 0) {
>>> + bdrv_abort_perm_update(child_bs);
>>> return NULL;
>>> }
>>>
>>
>> This function doesn't call bdrv_set_perm(). Intentional?
>
> Yes, intentional. It calls it indirectly via bdrv_replace_child(). I'll
> add a comment.
Right, bdrv_replace_child() invokes bdrv_update_perm() which invokes
bdrv_set_perm(). However, that means that there shouldn't be any caller
of bdrv_replace_child() which doesn't call bdrv_check_perm() before;
some don't do that, though, e.g. change_parent_backing_link().
Max
signature.asc
Description: OpenPGP digital signature