[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 1/1] mirror: do not increase offset during in
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH v2 1/1] mirror: do not increase offset during initial zero_or_discard phase |
Date: |
Fri, 3 Feb 2017 14:52:18 +0000 |
User-agent: |
Mutt/1.7.1 (2016-10-04) |
On Thu, Feb 02, 2017 at 05:25:15PM +0300, Denis V. Lunev wrote:
> From: Anton Nefedov <address@hidden>
>
> If explicit zeroing out before mirroring is required for the target image,
> it moves the block job offset counter to EOF, then offset and len counters
> count the image size twice. There is no harm but stats are confusing,
> specifically the progress of the operation is always reported as 99% by
> management tools.
>
> The patch skips offset increase for the first "technical" pass over the
> image. This should not cause any further harm.
>
> Signed-off-by: Anton Nefedov <address@hidden>
> Signed-off-by: Denis V. Lunev <address@hidden>
> CC: Jeff Cody <address@hidden>
> CC: Kevin Wolf <address@hidden>
> CC: Max Reitz <address@hidden>
> CC: Eric Blake <address@hidden>
> ---
> Changes from v1:
> - changed the approach - we do not allow to increase the offset rather then
> to move it back
> - description rewritten
> - kludges to tests are removed as not actually needed with this approach
>
> block/mirror.c | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
Another option is to put the flag in MirrorOp instead of MirrorBlockJob.
That reduces the scope of the variable, but this is okay too:
Reviewed-by: Stefan Hajnoczi <address@hidden>
signature.asc
Description: PGP signature