diff mbox series

[v7,32/47] block-copy: Use CAF to find sync=top base

Message ID 20200625152215.941773-33-mreitz@redhat.com (mailing list archive)
State New, archived
Headers show
Series block: Deal with filters | expand

Commit Message

Max Reitz June 25, 2020, 3:22 p.m. UTC
Signed-off-by: Max Reitz <mreitz@redhat.com>
---
 block/block-copy.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Andrey Shinkevich July 21, 2020, 12:42 p.m. UTC | #1
On 25.06.2020 18:22, Max Reitz wrote:
> Signed-off-by: Max Reitz <mreitz@redhat.com>
> ---
>   block/block-copy.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/block/block-copy.c b/block/block-copy.c
> index f7428a7c08..5e80569bb8 100644
> --- a/block/block-copy.c
> +++ b/block/block-copy.c
> @@ -437,8 +437,8 @@ static int block_copy_block_status(BlockCopyState *s, int64_t offset,
>       BlockDriverState *base;
>       int ret;
>   
> -    if (s->skip_unallocated && s->source->bs->backing) {
> -        base = s->source->bs->backing->bs;
> +    if (s->skip_unallocated) {
> +        base = bdrv_backing_chain_next(s->source->bs);
>       } else {
>           base = NULL;
>       }


Reviewed-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
diff mbox series

Patch

diff --git a/block/block-copy.c b/block/block-copy.c
index f7428a7c08..5e80569bb8 100644
--- a/block/block-copy.c
+++ b/block/block-copy.c
@@ -437,8 +437,8 @@  static int block_copy_block_status(BlockCopyState *s, int64_t offset,
     BlockDriverState *base;
     int ret;
 
-    if (s->skip_unallocated && s->source->bs->backing) {
-        base = s->source->bs->backing->bs;
+    if (s->skip_unallocated) {
+        base = bdrv_backing_chain_next(s->source->bs);
     } else {
         base = NULL;
     }