qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
	qemu-block@nongnu.org
Cc: kwolf@redhat.com, qemu-devel@nongnu.org
Subject: Re: [PATCH v3] block/backup-top: fix flags handling
Date: Fri, 7 Feb 2020 17:30:43 +0100	[thread overview]
Message-ID: <7b775d8f-a4b9-3376-1744-7cac2a792dba@redhat.com> (raw)
In-Reply-To: <20200207161231.32707-1-vsementsov@virtuozzo.com>


[-- Attachment #1.1: Type: text/plain, Size: 1381 bytes --]

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 <vsementsov@virtuozzo.com>
> ---
> 
> 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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2020-02-07 16:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-07 16:12 [PATCH v3] block/backup-top: fix flags handling Vladimir Sementsov-Ogievskiy
2020-02-07 16:30 ` Max Reitz [this message]
2020-02-07 16:47   ` Vladimir Sementsov-Ogievskiy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7b775d8f-a4b9-3376-1744-7cac2a792dba@redhat.com \
    --to=mreitz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=vsementsov@virtuozzo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).