[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v3 03/25] block: Add BDS.backing_overridden
From: |
Max Reitz |
Subject: |
Re: [Qemu-block] [PATCH v3 03/25] block: Add BDS.backing_overridden |
Date: |
Wed, 11 Jan 2017 20:06:12 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 |
On 11.01.2017 20:00, Eric Blake wrote:
> On 11/29/2016 07:18 PM, Max Reitz wrote:
>> If the backing file is overridden, this most probably does change the
>> guest-visible data of a BDS. Therefore, we will need to consider this in
>> bdrv_refresh_filename().
>>
>> Adding a new field to the BDS is not nice, but it is very simple and
>> exactly keeps track of whether the backing file has been overridden.
>>
>> This commit adds a FIXME which will be remedied by a follow-up commit.
>> Until then, the respective piece of code will not result in any behavior
>> that is worse than what we currently have.
>>
>> Signed-off-by: Max Reitz <address@hidden>
>> ---
>
>> +++ b/include/block/block_int.h
>> @@ -461,6 +461,7 @@ struct BlockDriverState {
>> char backing_file[PATH_MAX]; /* if non zero, the image is a diff of
>> this file image */
>> char backing_format[16]; /* if non-zero and backing_file exists */
>> + bool backing_overridden; /* backing file has been specified by the user
>> */
>
> Should we group all of the bool in this struct so as to reduce its size
> and improve cache locality? But it's already clunky, so that may be
> appropriate as a separate patch.
>
> Reviewed-by: Eric Blake <address@hidden>
Yep, makes sense, but we should do that in a separate patch.
(Or maybe we should fix the compiler to automatically do that
reordering? O:-))
Max
signature.asc
Description: OpenPGP digital signature