From: Markus Armbruster <armbru@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Cc: kwolf@redhat.com, qemu-block@nongnu.org, wencongyang2@huawei.com,
xiechanglong.d@gmail.com, qemu-devel@nongnu.org,
jsnow@redhat.com, hreitz@redhat.com, eblake@redhat.com
Subject: Re: [PATCH v2 10/19] block: introduce fleecing block driver
Date: Wed, 01 Sep 2021 13:44:58 +0200 [thread overview]
Message-ID: <877dg0bjut.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <20210827181808.311670-11-vsementsov@virtuozzo.com> (Vladimir Sementsov-Ogievskiy's message of "Fri, 27 Aug 2021 21:17:59 +0300")
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> writes:
> Introduce a new driver, that works in pair with copy-before-write to
> improve fleecing.
>
> Without fleecing driver, old fleecing scheme looks as follows:
>
> [guest]
> |
> |root
> v
> [copy-before-write] -----> [temp.qcow2] <--- [nbd export]
> | target |
> |file |backing
> v |
> [active disk] <-------------+
>
> With fleecing driver, new scheme is:
>
> [guest]
> |
> |root
> v
> [copy-before-write] -----> [fleecing] <--- [nbd export]
> | target | |
> |file | |file
> v | v
> [active disk]<--source------+ [temp.img]
>
> Benefits of new scheme:
>
> 1. Access control: if remote client try to read data that not covered
> by original dirty bitmap used on copy-before-write open, client gets
> -EACCES.
>
> 2. Discard support: if remote client do DISCARD, this additionally to
> discarding data in temp.img informs block-copy process to not copy
> these clusters. Next read from discarded area will return -EACCES.
> This is significant thing: when fleecing user reads data that was
> not yet copied to temp.img, we can avoid copying it on further guest
> write.
>
> 3. Synchronisation between client reads and block-copy write is more
> efficient: it doesn't block intersecting block-copy write during
> client read.
>
> 4. We don't rely on backing feature: active disk should not be backing
> of temp image, so we avoid some permission-related difficulties and
> temp image now is not required to support backing, it may be simple
> raw image.
>
> Note that now nobody calls fleecing_drv_activate(), so new driver is
> actually unusable. It's a work for the following patch: support
> fleecing block driver in copy-before-write filter driver.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> ---
> qapi/block-core.json | 17 ++-
> block/fleecing.h | 16 +++
> block/fleecing-drv.c | 260 +++++++++++++++++++++++++++++++++++++++++++
> MAINTAINERS | 1 +
> block/meson.build | 1 +
> 5 files changed, 294 insertions(+), 1 deletion(-)
> create mode 100644 block/fleecing-drv.c
>
> diff --git a/qapi/block-core.json b/qapi/block-core.json
> index c42d23752d..8a333136f5 100644
> --- a/qapi/block-core.json
> +++ b/qapi/block-core.json
> @@ -2826,13 +2826,14 @@
> # @blkreplay: Since 4.2
> # @compress: Since 5.0
> # @copy-before-write: Since 6.2
> +# @fleecing: Since 6.2
> #
> # Since: 2.9
> ##
> { 'enum': 'BlockdevDriver',
> 'data': [ 'blkdebug', 'blklogwrites', 'blkreplay', 'blkverify', 'bochs',
> 'cloop', 'compress', 'copy-before-write', 'copy-on-read', 'dmg',
> - 'file', 'ftp', 'ftps', 'gluster',
> + 'file', 'fleecing', 'ftp', 'ftps', 'gluster',
> {'name': 'host_cdrom', 'if': 'defined(HAVE_HOST_BLOCK_DEVICE)' },
> {'name': 'host_device', 'if': 'defined(HAVE_HOST_BLOCK_DEVICE)' },
> 'http', 'https', 'iscsi',
> @@ -4077,6 +4078,19 @@
> 'base': 'BlockdevOptionsGenericFormat',
> 'data': { 'target': 'BlockdevRef', '*bitmap': 'BlockDirtyBitmap' } }
>
> +##
> +# @BlockdevOptionsFleecing:
> +#
> +# Driver that works in pair with copy-before-write to make fleecing scheme.
This is really terse. Do we explain the driver's intended use anywhere?
I'd suggest s/to make fleecing scheme/to make a fleecing scheme/, except
it doesn't make much sense to me either way :)
> +#
> +# @source: source node of fleecing
We usually say "node name of ...".
> +#
> +# Since: 6.2
> +##
> +{ 'struct': 'BlockdevOptionsFleecing',
> + 'base': 'BlockdevOptionsGenericFormat',
> + 'data': { 'source': 'str' } }
> +
> ##
> # @BlockdevOptions:
> #
> @@ -4133,6 +4147,7 @@
> 'copy-on-read':'BlockdevOptionsCor',
> 'dmg': 'BlockdevOptionsGenericFormat',
> 'file': 'BlockdevOptionsFile',
> + 'fleecing': 'BlockdevOptionsFleecing',
> 'ftp': 'BlockdevOptionsCurlFtp',
> 'ftps': 'BlockdevOptionsCurlFtps',
> 'gluster': 'BlockdevOptionsGluster',
[...]
next prev parent reply other threads:[~2021-09-03 13:21 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-27 18:17 [PATCH v2 00/19] Make image fleecing more usable Vladimir Sementsov-Ogievskiy
2021-08-27 18:17 ` [PATCH v2 01/19] block/block-copy: move copy_bitmap initialization to block_copy_state_new() Vladimir Sementsov-Ogievskiy
2021-08-27 18:17 ` [PATCH v2 02/19] block/dirty-bitmap: bdrv_merge_dirty_bitmap(): add return value Vladimir Sementsov-Ogievskiy
2021-08-27 18:17 ` [PATCH v2 03/19] block/block-copy: block_copy_state_new(): add bitmap parameter Vladimir Sementsov-Ogievskiy
2021-08-27 18:17 ` [PATCH v2 04/19] block/copy-before-write: add bitmap open parameter Vladimir Sementsov-Ogievskiy
2021-08-27 18:17 ` [PATCH v2 05/19] block/block-copy: add block_copy_reset() Vladimir Sementsov-Ogievskiy
2021-08-27 18:17 ` [PATCH v2 06/19] block: intoduce reqlist Vladimir Sementsov-Ogievskiy
2021-08-27 18:17 ` [PATCH v2 07/19] block/dirty-bitmap: introduce bdrv_dirty_bitmap_status() Vladimir Sementsov-Ogievskiy
2021-08-27 18:17 ` [PATCH v2 08/19] block/reqlist: add reqlist_wait_all() Vladimir Sementsov-Ogievskiy
2021-08-27 18:17 ` [PATCH v2 09/19] block: introduce FleecingState class Vladimir Sementsov-Ogievskiy
2021-08-27 18:17 ` [PATCH v2 10/19] block: introduce fleecing block driver Vladimir Sementsov-Ogievskiy
2021-09-01 11:44 ` Markus Armbruster [this message]
2021-09-03 13:29 ` Vladimir Sementsov-Ogievskiy
2021-08-27 18:18 ` [PATCH v2 11/19] block/copy-before-write: support " Vladimir Sementsov-Ogievskiy
2021-08-27 18:18 ` [PATCH v2 12/19] block/block-copy: add write-unchanged mode Vladimir Sementsov-Ogievskiy
2021-08-27 18:18 ` [PATCH v2 13/19] block/copy-before-write: use write-unchanged in fleecing mode Vladimir Sementsov-Ogievskiy
2021-08-27 18:18 ` [PATCH v2 14/19] iotests/image-fleecing: add test-case for fleecing format node Vladimir Sementsov-Ogievskiy
2021-08-27 18:18 ` [PATCH v2 15/19] iotests.py: add qemu_io_pipe_and_status() Vladimir Sementsov-Ogievskiy
2021-08-27 18:18 ` [PATCH v2 16/19] iotests/image-fleecing: add test case with bitmap Vladimir Sementsov-Ogievskiy
2021-08-27 18:18 ` [PATCH v2 17/19] block: blk_root(): return non-const pointer Vladimir Sementsov-Ogievskiy
2021-08-27 18:18 ` [PATCH v2 18/19] qapi: backup: add immutable-source parameter Vladimir Sementsov-Ogievskiy
2021-09-01 11:47 ` Markus Armbruster
2021-08-27 18:18 ` [PATCH v2 19/19] iotests/image-fleecing: test push backup with fleecing Vladimir Sementsov-Ogievskiy
2021-09-22 7:45 ` [PATCH v2 00/19] Make image fleecing more usable Vladimir Sementsov-Ogievskiy
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=877dg0bjut.fsf@dusky.pond.sub.org \
--to=armbru@redhat.com \
--cc=eblake@redhat.com \
--cc=hreitz@redhat.com \
--cc=jsnow@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=vsementsov@virtuozzo.com \
--cc=wencongyang2@huawei.com \
--cc=xiechanglong.d@gmail.com \
/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).