qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH for-5.0 02/31] block: Add BdrvChildRole


From: Max Reitz
Subject: Re: [PATCH for-5.0 02/31] block: Add BdrvChildRole
Date: Thu, 28 Nov 2019 15:00:56 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2

On 28.11.19 12:24, Vladimir Sementsov-Ogievskiy wrote:
> 28.11.2019 13:52, Max Reitz wrote:
>> On 28.11.19 10:31, Vladimir Sementsov-Ogievskiy wrote:
>>> 27.11.2019 16:15, Max Reitz wrote:
>>>> This enum will supplement BdrvChildClass when it comes to what role (or
>>>> combination of roles) a child takes for its parent.
>>>>
>>>> Because empty enums are not allowed, let us just start with it filled.
>>>>
>>>> Signed-off-by: Max Reitz <address@hidden>
>>>> ---
>>>>    include/block/block.h | 38 ++++++++++++++++++++++++++++++++++++++
>>>>    1 file changed, 38 insertions(+)
>>>>
>>>> diff --git a/include/block/block.h b/include/block/block.h
>>>> index 38963ef203..36817d5689 100644
>>>> --- a/include/block/block.h
>>>> +++ b/include/block/block.h
>>>> @@ -279,6 +279,44 @@ enum {
>>>>        DEFAULT_PERM_UNCHANGED      = BLK_PERM_ALL & 
>>>> ~DEFAULT_PERM_PASSTHROUGH,
>>>>    };
>>>>    
>>>> +typedef enum BdrvChildRole {
>>>
>>> Don't you want to call it just BdrvChildFlags ?
>>> Benefits:
>>>
>>> 1. Do not intersect with old BdrvChildRole.
>>
>> Well, that doesn’t change the fact that the old BdrvChildRole just
>> doesn’t describe a role.
>>
>>> 2. I think, BDRV_CHILD_STAY_AT_NODE is not a role, but just a property or 
>>> flag..
>>
>> I can be convinced to let STAY_AT_NODE stay a property of
>> BdrvChildClass. :-)
> 
> or BdrvChild if we want it to be property of object, not class.

Sure, but that would then no longer concern this series, I think.  (That
is, either I make STAY_AT_NODE a BdrvChildRole in this series, or I just
don’t.)

Max

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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