All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Cc: "Denis V. Lunev" <den@virtuozzo.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	qemu-devel@nongnu.org, qemu-block@nongnu.org,
	nbd-general@lists.sourceforge.net, alex@alex.org.uk,
	eblake@redhat.com, stefanha@redhat.com, w@uter.be,
	mreitz@redhat.com
Subject: Re: [Qemu-devel] [PATCH] proto: add 'shift' extension.
Date: Wed, 28 Sep 2016 11:32:19 +0200	[thread overview]
Message-ID: <20160928093219.GG5236@noname.redhat.com> (raw)
In-Reply-To: <57EB86A2.6030000@virtuozzo.com>

Am 28.09.2016 um 11:00 hat Vladimir Sementsov-Ogievskiy geschrieben:
> On 28.09.2016 11:56, Kevin Wolf wrote:
> >Am 28.09.2016 um 10:37 hat Denis V. Lunev geschrieben:
> >>On 09/28/2016 11:34 AM, Kevin Wolf wrote:
> >>>Am 27.09.2016 um 20:59 hat Denis V. Lunev geschrieben:
> >>>>On 09/27/2016 08:04 PM, Paolo Bonzini wrote:
> >>>>>On 27/09/2016 15:28, Denis V. Lunev wrote:
> >>>>>>On 09/27/2016 03:07 PM, Paolo Bonzini wrote:
> >>>>>>>----- Original Message -----
> >>>>>>>>From: "Denis V. Lunev" <den@virtuozzo.com>
> >>>>>>>>To: "Paolo Bonzini" <pbonzini@redhat.com>
> >>>>>>>>Cc: "Vladimir Sementsov-Ogievskiy" <vsementsov@virtuozzo.com>, qemu-devel@nongnu.org, qemu-block@nongnu.org,
> >>>>>>>>nbd-general@lists.sourceforge.net, alex@alex.org.uk, eblake@redhat.com, kwolf@redhat.com, stefanha@redhat.com,
> >>>>>>>>w@uter.be
> >>>>>>>>Sent: Tuesday, September 27, 2016 12:25:54 PM
> >>>>>>>>Subject: Re: [PATCH] proto: add 'shift' extension.
> >>>>>>>>
> >>>>>>>>On 09/27/2016 01:15 PM, Paolo Bonzini wrote:
> >>>>>>>>>>We could go in a different direction and export flag
> >>>>>>>>>>'has_zero_init' which will report that the storage is
> >>>>>>>>>>initialized with all zeroes at the moment. In this
> >>>>>>>>>>case mirroring code will not fall into this
> >>>>>>>>>>branch.
> >>>>>>>>>Why don't you add the zero_init flag to QEMU's NBD driver instead?
> >>>>>>>>for all cases without knowing real backend on the server side?
> >>>>>>>>I think this would be wrong.
> >>>>>>>Add it to the command line, and leave it to libvirt or the user to
> >>>>>>>pass "-drive file.driver=nbd,...,file.zero-init=on".
> >>>>>>I have started with something very similar for 'drive-mirror' command.
> >>>>>>We have added additional flag for this to improve migration speed
> >>>>>>and this was rejected.
> >>>>>You can add it through the filename path too, through a URI option
> >>>>>"nbd://...?zero-init=on".
> >>>>>
> >>>>>Paolo
> >>>>ha, cool idea! Thanks!
> >>>What's the advantage of writing "?zero-init=on" instead of
> >>>",zero-init=on"? Doesn't it only add more string parsing code for no
> >>>benefit?
> >>>
> >>>Kevin
> >>Here I appreciate the idea to pass command line options in the
> >>target file name. Will it be performed via comma or '?' - there
> >>is no difference for us. We will check and use what is already
> >>implemented.
> >>
> >>The most important for us is an approach.
> >For me, too. With commas it's not part of the file name that must be
> >parsed out of the string, but a separate option, which is the much
> >cleaner approach.
> >
> >The good thing is that the conversion of NBD to individual options has
> >progressed far enough that you wouldn't even be able to implement the
> >URL extension without implementing the separate option, too. :-)
> >(Because all the URL parser does is splitting the URL into individual
> >options before passing them to nbd_open().)
> >
> >Kevin
> 
> Just note: we can use json instead of url, like this: virsh
> qemu-monitor-command backup-vm
> '{"execute":"drive-backup","arguments":{"device": "disk", "target": "json://{\"driver\":\"nbd\",\"host\":\"127.0.0.1\",\"port\":\"10809\",\"zero-init\":\"on\"}",
> "mode": "existing", "sync": "full"}}'

Ah, sorry, I missed the part that you need a file name because that's
the only thing the QMP command accepts. Yes, then the json: pseudo
protocol is a good workaround for the moment.

I hope we can declare blockdev-add stable soon, and then you can use
blockdev-backup instead of drive-backup.

Kevin

  reply	other threads:[~2016-09-28  9:32 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-26 12:46 [Qemu-devel] [PATCH] proto: add 'shift' extension Vladimir Sementsov-Ogievskiy
2016-09-26 12:51 ` Paolo Bonzini
2016-09-26 13:53   ` Vladimir Sementsov-Ogievskiy
2016-09-26 13:54     ` Paolo Bonzini
2016-09-26 14:06       ` Alex Bligh
2016-09-26 20:35   ` Eric Blake
2016-09-26 14:05 ` Alex Bligh
2016-09-26 20:21 ` Eric Blake
2016-09-26 23:41   ` [Qemu-devel] [Nbd] " Wouter Verhelst
2016-09-27  7:36     ` Alex Bligh
2016-09-27  9:43 ` [Qemu-devel] " Denis V. Lunev
2016-09-27 10:15   ` Paolo Bonzini
2016-09-27 10:25     ` Denis V. Lunev
2016-09-27 12:07       ` Paolo Bonzini
2016-09-27 13:28         ` Denis V. Lunev
2016-09-27 17:04           ` Paolo Bonzini
2016-09-27 18:59             ` Denis V. Lunev
2016-09-28  8:34               ` Kevin Wolf
2016-09-28  8:37                 ` Denis V. Lunev
2016-09-28  8:56                   ` Kevin Wolf
2016-09-28  9:00                     ` Vladimir Sementsov-Ogievskiy
2016-09-28  9:32                       ` Kevin Wolf [this message]
2016-09-27 13:46         ` Denis V. Lunev

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=20160928093219.GG5236@noname.redhat.com \
    --to=kwolf@redhat.com \
    --cc=alex@alex.org.uk \
    --cc=den@virtuozzo.com \
    --cc=eblake@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=nbd-general@lists.sourceforge.net \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=vsementsov@virtuozzo.com \
    --cc=w@uter.be \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.