From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
To: qemu-block@nongnu.org
Cc: qemu-devel@nongnu.org, armbru@redhat.com, mreitz@redhat.com,
kwolf@redhat.com, jsnow@redhat.com, eblake@redhat.com,
pkrempa@redhat.com, nshirokovskiy@virtuozzo.com, den@openvz.org
Subject: Re: [PATCH 1/2] qapi: block-dirty-bitmap-merge: support allocation maps
Date: Tue, 27 Apr 2021 14:59:46 +0300 [thread overview]
Message-ID: <f11ccb8e-751e-1fea-b7f6-d2349b65bdcd@virtuozzo.com> (raw)
In-Reply-To: <20210427111126.84307-2-vsementsov@virtuozzo.com>
27.04.2021 14:11, Vladimir Sementsov-Ogievskiy wrote:
> Add possibility to merge allocation map of specified node into target
> bitmap.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy<vsementsov@virtuozzo.com>
> ---
> qapi/block-core.json | 31 +++++++++++++++++--
> include/block/block_int.h | 4 +++
> block/dirty-bitmap.c | 42 +++++++++++++++++++++++++
> block/monitor/bitmap-qmp-cmds.c | 55 ++++++++++++++++++++++++++++-----
> 4 files changed, 122 insertions(+), 10 deletions(-)
>
> diff --git a/qapi/block-core.json b/qapi/block-core.json
> index 6d227924d0..0fafb043bc 100644
> --- a/qapi/block-core.json
> +++ b/qapi/block-core.json
> @@ -2006,6 +2006,32 @@
> 'data': { 'node': 'str', 'name': 'str', '*granularity': 'uint32',
> '*persistent': 'bool', '*disabled': 'bool' } }
>
> +##
> +# @AllocationMapMode:
> +#
> +# An enumeration of possible allocation maps that could be merged into target
> +# bitmap.
> +#
> +# @top: The allocation status of the top layer of the attached storage node.
> +#
> +# Since: 6.1
> +##
> +{ 'enum': 'AllocationMapMode',
> + 'data': ['top'] }
> +
> +##
> +# @BlockDirtyBitmapMergeExternalSource:
> +#
> +# @node: name of device/node which the bitmap is tracking
> +#
> +# @name: name of the dirty bitmap
> +#
> +# Since: 6.1
> +##
> +{ 'struct': 'BlockDirtyBitmapMergeExternalSource',
> + 'data': { 'node': 'str', '*name': 'str',
> + '*allocation-map': 'AllocationMapMode' } }
> +
> ##
> # @BlockDirtyBitmapMergeSource:
> #
> @@ -2017,7 +2043,7 @@
> ##
> { 'alternate': 'BlockDirtyBitmapMergeSource',
> 'data': { 'local': 'str',
> - 'external': 'BlockDirtyBitmap' } }
> + 'external': 'BlockDirtyBitmapMergeExternalSource' } }
>
> ##
> # @BlockDirtyBitmapMerge:
> @@ -2176,7 +2202,8 @@
> #
> ##
> { 'command': 'block-dirty-bitmap-merge',
> - 'data': 'BlockDirtyBitmapMerge' }
> + 'data': 'BlockDirtyBitmapMerge',
> + 'coroutine': true }
>
> ##
So, what I propose makes possible to issue the following command:
block-dirty-bitmap-merge
bitmaps: [{"allocation-map": "top", "node": "drive0"}]
node: target-node-name
target: target-bitmap-name
I've discussed it with Nikolay, and he requested a possibility of querying allocation status of base..top sub-chain (assume several snapshots was done without creating bitmaps, and we want to restore the bitmap for backup).
So, we actually want something like
block-dirty-bitmap-merge
bitmaps: [{top: "tpp-node-name", bottom: "bottom-node-name"}]
node: target-node-name
target: target-bitmap-name
--
Best regards,
Vladimir
next prev parent reply other threads:[~2021-04-27 12:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-27 11:11 [PATCH RFC C0/2] support allocation-map for block-dirty-bitmap-merge Vladimir Sementsov-Ogievskiy
2021-04-27 11:11 ` [PATCH 1/2] qapi: block-dirty-bitmap-merge: support allocation maps Vladimir Sementsov-Ogievskiy
2021-04-27 11:59 ` Vladimir Sementsov-Ogievskiy [this message]
2021-04-27 11:11 ` [PATCH 2/2] iotests: add allocation-map-to-bitmap Vladimir Sementsov-Ogievskiy
2021-04-27 11:46 ` [PATCH RFC C0/2] support allocation-map for block-dirty-bitmap-merge Vladimir Sementsov-Ogievskiy
2021-04-27 18:24 ` John Snow
2021-04-28 0:49 ` Vladimir Sementsov-Ogievskiy
2021-04-28 5:23 ` Markus Armbruster
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=f11ccb8e-751e-1fea-b7f6-d2349b65bdcd@virtuozzo.com \
--to=vsementsov@virtuozzo.com \
--cc=armbru@redhat.com \
--cc=den@openvz.org \
--cc=eblake@redhat.com \
--cc=jsnow@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=nshirokovskiy@virtuozzo.com \
--cc=pkrempa@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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).