qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [Qemu-devel] [PATCH] block: Always call bdrv_child_chec


From: Eric Blake
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH] block: Always call bdrv_child_check_perm first
Date: Wed, 15 Mar 2017 06:47:57 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

On 03/14/2017 10:06 PM, Fam Zheng wrote:

>>> +static int bdrv_child_check_perm(BdrvChild *c, uint64_t perm, uint64_t 
>>> shared,
>>> +                                 GSList *ignore_children, Error **errp);
>>> +static void bdrv_child_abort_perm_update(BdrvChild *c);
>>> +static void bdrv_child_set_perm(BdrvChild *c, uint64_t perm, uint64_t 
>>> shared);
>>> +
>>
>> Now that you have static prototypes, is it worth rearranging the file
>> (in a followup) to sort the function implementations into topological
>> order so that a prototype is not necessary?  [In general, I try to code
>> so that static prototypes are only necessary if I am implementing
>> mutually-referencing recursive code. But it's not a strict requirement]
> 
> Yes, thanks for pointing out, but it does have a recursion here:
> 
> bdrv_check_update_perm
>     -> bdrv_check_perm
>         -> bdrv_child_check_perm
>             -> bdrv_check_update_perm
> 

So you're right, topological sorting is not possible.  Carry on, nothing
to see here :)

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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