qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Denis V. Lunev" <den@virtuozzo.com>
To: Stefan Hajnoczi <stefanha@gmail.com>,
	Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Cc: Eric Blake <eblake@redhat.com>,
	qemu-devel@nongnu.org, kwolf@redhat.com, qemu-block@nongnu.org,
	armbru@redhat.com, mreitz@redhat.com, lcapitulino@redhat.com,
	Jeff Cody <jcody@redhat.com>
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH] mirror: add target-zeroed flag
Date: Sat, 11 Jun 2016 14:57:33 +0300	[thread overview]
Message-ID: <575BFCAD.8010504@virtuozzo.com> (raw)
In-Reply-To: <20160610165913.GI3855@stefanha-x1.localdomain>

On 06/10/2016 07:59 PM, Stefan Hajnoczi wrote:
> On Tue, Jun 07, 2016 at 07:30:19PM +0300, Vladimir Sementsov-Ogievskiy wrote:
>> On 03.06.2016 18:45, Denis V. Lunev wrote:
>>> On 06/03/2016 06:06 PM, Eric Blake wrote:
>>>> On 06/03/2016 08:05 AM, Vladimir Sementsov-Ogievskiy wrote:
>>>>> Add target-zeroed flag to allow user specify that target is already
>>>>> zeroed. With this flag set zeroes which was in source before mirror
>>>>> start will not be copyed.
>>>> With this flag set, any runs of zeroes in the source before the mirror
>>>> starts will not be copied.
>>>>
>>>>> Without this libvirt migration of empty disk takes too long time.
>>>>>
>>>>> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
>>>>> ---
>>>>>
>>>>> I've tested it with
>>>>> time virsh migrate --live test qemu+ssh://other_node/system
>>>>> --copy-storage-all
>>>> Presumably with a libvirt patch to turn on the optional flag.
>>>>
>>>> I'm not sure I like this patch.  Libvirt uses NBD to implement
>>>> --copy-storage-all, I think we're better off improving NBD to
>>>> automatically handle sparse writes, than we are to add a one-off hack
>>>> that requires libvirt to change.  That is, once NBD is smarter, the copy
>>>> will be faster without needing a tweak.  And we ARE working on making
>>>> NBD smarter (one of my goals for the 2.7 release is to get all the
>>>> sparse file additions to NBD implemented)
>>>>
>>>> That said, I'll still review it.
>>> this is not enough, definitely.
>>>
>>> There is a problem that mirror_iteration code sleeps even for
>>> not read zeroes (and this IS slow). Moreover, even sending sparcified
>>> zeroes takes a lot of time for round trips.
>>>
>>> We have started with that and spent a lot of time trying to improve
>>> the situation.
>>>
>>> Also, as a side note, the QCOW2 file on a source and a target will
>>> be different without the flag - original image has empty blocks,
>>> target image will have blocks explicitly marked with zeroes.
>>>
>>> Though this is a matter of taste... For us this approach is the simplest.
>>>
>>> Den
>> Hey, what do think about it? Don't we forget somebody to be cc'ed?
> Jeff Cody <jcody@redhat.com> maintains block jobs.  This patch should go
> through him.
>
> Stefan
thank you.

I think I have a better patch for this without additional flag.
I have used approach similar one in qemu-img. I am going
to resubmit more with driver-mirror stuff at the beginning
of next week.

Den

      reply	other threads:[~2016-06-11 11:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-03 14:05 [Qemu-devel] [PATCH] mirror: add target-zeroed flag Vladimir Sementsov-Ogievskiy
2016-06-03 15:06 ` Eric Blake
2016-06-03 15:45   ` Denis V. Lunev
2016-06-07 16:30     ` Vladimir Sementsov-Ogievskiy
2016-06-10 16:59       ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2016-06-11 11:57         ` Denis V. Lunev [this message]

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=575BFCAD.8010504@virtuozzo.com \
    --to=den@virtuozzo.com \
    --cc=armbru@redhat.com \
    --cc=eblake@redhat.com \
    --cc=jcody@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    --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).