[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH] proto: add 'shift' extension.
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-block] [PATCH] proto: add 'shift' extension. |
Date: |
Wed, 28 Sep 2016 11:32:19 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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" <address@hidden>
> >>>>>>>>To: "Paolo Bonzini" <address@hidden>
> >>>>>>>>Cc: "Vladimir Sementsov-Ogievskiy" <address@hidden>, address@hidden,
> >>>>>>>>address@hidden,
> >>>>>>>>address@hidden, address@hidden, address@hidden, address@hidden,
> >>>>>>>>address@hidden,
> >>>>>>>>address@hidden
> >>>>>>>>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
- Re: [Qemu-block] [PATCH] proto: add 'shift' extension., (continued)
- Re: [Qemu-block] [PATCH] proto: add 'shift' extension., Paolo Bonzini, 2016/09/27
- Re: [Qemu-block] [PATCH] proto: add 'shift' extension., Denis V. Lunev, 2016/09/27
- Re: [Qemu-block] [PATCH] proto: add 'shift' extension., Paolo Bonzini, 2016/09/27
- Re: [Qemu-block] [PATCH] proto: add 'shift' extension., Denis V. Lunev, 2016/09/27
- Re: [Qemu-block] [PATCH] proto: add 'shift' extension., Paolo Bonzini, 2016/09/27
- Re: [Qemu-block] [PATCH] proto: add 'shift' extension., Denis V. Lunev, 2016/09/27
- Re: [Qemu-block] [PATCH] proto: add 'shift' extension., Kevin Wolf, 2016/09/28
- Re: [Qemu-block] [PATCH] proto: add 'shift' extension., Denis V. Lunev, 2016/09/28
- Re: [Qemu-block] [PATCH] proto: add 'shift' extension., Kevin Wolf, 2016/09/28
- Re: [Qemu-block] [PATCH] proto: add 'shift' extension., Vladimir Sementsov-Ogievskiy, 2016/09/28
- Re: [Qemu-block] [PATCH] proto: add 'shift' extension.,
Kevin Wolf <=
- Re: [Qemu-block] [PATCH] proto: add 'shift' extension., Denis V. Lunev, 2016/09/27