[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH qemu 1/4] drive-mirror: add support for sync=bitmap mode=neve
From: |
Max Reitz |
Subject: |
Re: [PATCH qemu 1/4] drive-mirror: add support for sync=bitmap mode=never |
Date: |
Thu, 1 Oct 2020 16:18:30 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 |
On 22.09.20 11:14, Fabian Grünbichler wrote:
> From: John Snow <jsnow@redhat.com>
>
> This patch adds support for the "BITMAP" sync mode to drive-mirror and
> blockdev-mirror. It adds support only for the BitmapSyncMode "never,"
> because it's the simplest mode.
>
> This mode simply uses a user-provided bitmap as an initial copy
> manifest, and then does not clear any bits in the bitmap at the
> conclusion of the operation.
>
> Any new writes dirtied during the operation are copied out, in contrast
> to backup. Note that whether these writes are reflected in the bitmap
> at the conclusion of the operation depends on whether that bitmap is
> actually recording!
>
> This patch was originally based on one by Ma Haocong, but it has since
> been modified pretty heavily.
>
> Suggested-by: Ma Haocong <mahaocong@didichuxing.com>
> Signed-off-by: Ma Haocong <mahaocong@didichuxing.com>
> Signed-off-by: John Snow <jsnow@redhat.com>
> Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
> ---
> include/block/block_int.h | 4 +-
> block/mirror.c | 98 ++++++++++++++++++++++++++++++-------
> blockdev.c | 39 +++++++++++++--
> tests/test-block-iothread.c | 4 +-
> qapi/block-core.json | 29 +++++++++--
> 5 files changed, 145 insertions(+), 29 deletions(-)
[...]
> diff --git a/qapi/block-core.json b/qapi/block-core.json
> index 2d94873ca0..dac5497084 100644
> --- a/qapi/block-core.json
> +++ b/qapi/block-core.json
[...]
> @@ -2270,10 +2281,19 @@
> # (all the disk, only the sectors allocated in the topmost image, or
> # only new I/O).
> #
> +# @bitmap: The name of a bitmap to use for sync=bitmap mode. This argument
> must
> +# be present for bitmap mode and absent otherwise. The bitmap's
> +# granularity is used instead of @granularity (since 5.2).
> +#
> +# @bitmap-mode: Specifies the type of data the bitmap should contain after
> +# the operation concludes. Must be present if sync is "bitmap".
> +# Must NOT be present otherwise. (Since 5.2)
> +#
> # @granularity: granularity of the dirty bitmap, default is 64K
> # if the image format doesn't have clusters, 4K if the clusters
> # are smaller than that, else the cluster size. Must be a
> -# power of 2 between 512 and 64M
> +# power of 2 between 512 and 64M . Must not be specified if
s/ \./\./
(What a cheerful-looking regex.)
With that fixed:
Reviewed-by: Max Reitz <mreitz@redhat.com>
> +# @bitmap is present.
> #
> # @buf-size: maximum amount of data in flight from source to
> # target
signature.asc
Description: OpenPGP digital signature
- Re: [PATCH qemu 1/4] drive-mirror: add support for sync=bitmap mode=never,
Max Reitz <=