qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>,
	qemu-devel@nongnu.org, qemu-block@nongnu.org
Cc: kwolf@redhat.com, armbru@redhat.com, eblake@redhat.com,
	den@openvz.org, vsementsov@virtuozzo.com
Subject: Re: [Qemu-devel] [PATCH v4 1/5] Discard blocks while copy-on-read
Date: Mon, 10 Dec 2018 16:24:18 +0100	[thread overview]
Message-ID: <f7e23917-92ea-bdc9-09a4-9deafa7ee142@redhat.com> (raw)
In-Reply-To: <1543568126-727235-2-git-send-email-andrey.shinkevich@virtuozzo.com>

[-- Attachment #1: Type: text/plain, Size: 1205 bytes --]

On 30.11.18 09:55, Andrey Shinkevich wrote:
> Discards the block duplicated in an intermediate backing file
> after the block have been copied into the active layer during
> QMP block-stream operation.
> It saves the disk space while merging external snapshots.
> 
> Signed-off-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
> ---
>  block/stream.c | 428 +++++++++++++++++++++++++++++++++++++++++++++++++++++++--
>  1 file changed, 413 insertions(+), 15 deletions(-)

I wonder why you aren't adding this functionality to the copy-on-read
filter driver; not just because it makes sense to have feature parity
between block-stream and that filter, but also because I imagine you
could use it as the filter node you're adding here.

I thought that block-stream could be rewritten to:
(1) Create a block-stream filter node on top of @device, with the
necessary parameters,
(2) Read everything that is allocated in (@base, @device), so that it is
copied to the target.

I think that can be done today.  There is no need for the COR filter to
support a base node parameter, as block-stream simply needs to take care
just to read things that are allocated above @base.

Max


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2018-12-10 15:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-30  8:55 [Qemu-devel] [PATCH v4 0/5] Discrad blocks during block-stream operation Andrey Shinkevich
2018-11-30  8:55 ` [Qemu-devel] [PATCH v4 1/5] Discard blocks while copy-on-read Andrey Shinkevich
2018-12-10 15:24   ` Max Reitz [this message]
2018-11-30  8:55 ` [Qemu-devel] [PATCH v4 2/5] The discard flag for block stream operation Andrey Shinkevich
2018-11-30  8:55 ` [Qemu-devel] [PATCH v4 3/5] iotests: allow resume_drive by node name Andrey Shinkevich
2018-11-30  8:55 ` [Qemu-devel] [PATCH v4 4/5] iotests: prepare 030 for graph change Andrey Shinkevich
2018-11-30  8:55 ` [Qemu-devel] [PATCH v4 5/5] iotests: 030 with block-stream discard Andrey Shinkevich

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=f7e23917-92ea-bdc9-09a4-9deafa7ee142@redhat.com \
    --to=mreitz@redhat.com \
    --cc=andrey.shinkevich@virtuozzo.com \
    --cc=armbru@redhat.com \
    --cc=den@openvz.org \
    --cc=eblake@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=vsementsov@virtuozzo.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).