qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v3] block/backup-top: fix flags handling


From: Max Reitz
Subject: Re: [PATCH v3] block/backup-top: fix flags handling
Date: Fri, 7 Feb 2020 17:30:43 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1

On 07.02.20 17:12, Vladimir Sementsov-Ogievskiy wrote:
> backup-top "supports" write-unchanged, by skipping CBW operation in
> backup_top_co_pwritev. But it forgets to do the same in
> backup_top_co_pwrite_zeroes, as well as declare support for
> BDRV_REQ_WRITE_UNCHANGED.
> 
> Fix this, and, while being here, declare also support for flags
> supported by source child.
> 
> Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
> ---
> 
> v3: rebase on master, keep state initialization after check top != NULL.
> 
> v2: restrict flags propagation like it is done in other filters [Eric]
>     move state variable initialization to the top
>  block/backup-top.c | 31 ++++++++++++++++++++-----------
>  1 file changed, 20 insertions(+), 11 deletions(-)
> 
> diff --git a/block/backup-top.c b/block/backup-top.c
> index fa78f3256d..1bfb360bd3 100644
> --- a/block/backup-top.c
> +++ b/block/backup-top.c

[...]

> @@ -196,8 +200,13 @@ BlockDriverState 
> *bdrv_backup_top_append(BlockDriverState *source,
>          return NULL;
>      }
>  
> -    top->total_sectors = source->total_sectors;
>      state = top->opaque;
> +    top->total_sectors = source->total_sectors;

This looks a bit accidental, but, well, whatever.

Thanks, applied to my block branch:

https://git.xanclic.moe/XanClic/qemu/commits/branch/block

Max

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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