qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 1/7] block-copy: streamline choice of copy_range vs. read/


From: Paolo Bonzini
Subject: Re: [PATCH v2 1/7] block-copy: streamline choice of copy_range vs. read/write
Date: Thu, 27 May 2021 21:04:10 +0200



Il gio 27 mag 2021, 14:07 Stefan Hajnoczi <stefanha@redhat.com> ha scritto:
On Tue, May 18, 2021 at 12:07:51PM +0200, Emanuele Giuseppe Esposito wrote:
>      } else {
>          /*
>           * We enable copy-range, but keep small copy_size, until first
>           * successful copy_range (look at block_copy_do_copy).
>           */

Is this comment still correct? It appears that this branch of the if
statement does not always enable copy-range (the !use_copy_range case).

It is correct, but it applies only if use_copy_range is true (the patch doesn't change this).

Paolo

> -        s->use_copy_range = use_copy_range;
> -        s->copy_size = MAX(s->cluster_size, BLOCK_COPY_MAX_BUFFER);
> +        s->method = use_copy_range ? COPY_RANGE_SMALL : COPY_READ_WRITE;

reply via email to

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