From: Kevin Wolf <kwolf@redhat.com>
To: Peter Krempa <pkrempa@redhat.com>
Cc: Max Reitz <mreitz@redhat.com>,
Ciprian Barbu <Ciprian.Barbu@enea.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
Eric Blake <eblake@redhat.com>,
Alexandru Avadanii <Alexandru.Avadanii@enea.com>,
Jeff Cody <jcody@redhat.com>,
Markus Armbruster <armbru@redhat.com>,
svc-armband <armband@enea.com>
Subject: Re: [Qemu-devel] nbd: Possible regression in 2.9 RCs
Date: Tue, 4 Apr 2017 14:16:24 +0200 [thread overview]
Message-ID: <20170404121624.GA4536@noname.str.redhat.com> (raw)
In-Reply-To: <20170403135012.GY26598@andariel.pipo.sk>
[-- Attachment #1: Type: text/plain, Size: 1906 bytes --]
Am 03.04.2017 um 15:50 hat Peter Krempa geschrieben:
> On Mon, Apr 03, 2017 at 15:00:41 +0200, Kevin Wolf wrote:
> > If I understand correctly, this is a case of incoming live migration,
> > i.e. the virtio-blk device which is blocking the writes to the image
> > doesn't really belong to a running guest yet.
>
> Yes, exactly. libvirt starts the NBD server on the destination of
> the migration. Until then the VM did not ever run yet. The VM will run
> once the memory migration finishes, so the guest front-end will not
> write anything at that point.
>
> > So if we need to make an exception (and actually reading the context
> > makes it appear so), I guess it would have to be that devices actually
> > can share the write permission during incoming migration, but not any
> > more later (unless the share-rw flag is set).
>
> Yes, this would be desired to avoid a regression. Libvirt then tears
> down the mirror prior to resuming the VM (afaik).
Now the big question is how to implement this. Just not requesting the
write permission initially if runstate_check(RUN_STATE_INMIGRATE) is
easy. But we need to find a place to actually request it later, after
the mirror has completed, and before the VM is running.
My first thought was that we could add a VMChangeStateHandler and just
request the permission in there. However, requesting the permission can
fail (e.g. because the NBD server hasn't been shut down) and we can't
let a state transition fail from a VMChangeStateHandler.
Maybe the next best thing we could do is to have a BlockDevOps callback
for invalidate_cache/inactivate and get the permissions there. This one
could return an error, which would be passed up the stack and eventually
cause qmp_cont() to fail (i.e. it would refuse to resume the VM). This
sounds workable to me.
Any comments on this approach, or maybe other ideas?
Kevin
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2017-04-04 12:16 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-31 16:03 [Qemu-devel] nbd: Possible regression in 2.9 RCs Ciprian Barbu
2017-03-31 17:32 ` Ciprian Barbu
2017-03-31 17:36 ` Ciprian Barbu
2017-03-31 17:43 ` Max Reitz
2017-03-31 17:49 ` Ciprian Barbu
2017-03-31 17:57 ` Max Reitz
2017-03-31 19:07 ` Alexandru Avadanii
2017-04-03 18:52 ` Kashyap Chamarthy
2017-04-04 8:07 ` ciprian.barbu
2017-04-03 8:15 ` Kevin Wolf
2017-04-03 12:39 ` Max Reitz
2017-04-03 13:00 ` Kevin Wolf
2017-04-03 13:50 ` Peter Krempa
2017-04-04 12:16 ` Kevin Wolf [this message]
2017-04-04 13:51 ` Eric Blake
2017-04-04 14:04 ` Paolo Bonzini
2017-04-04 14:53 ` Kevin Wolf
2017-04-04 15:09 ` Paolo Bonzini
2017-04-05 11:01 ` Kevin Wolf
2017-04-05 21:13 ` Paolo Bonzini
2017-04-06 8:48 ` Kevin Wolf
2017-04-06 9:03 ` Kevin Wolf
2017-04-03 19:48 ` Eric Blake
2017-04-03 19:44 ` Eric Blake
2017-04-04 8:17 ` ciprian.barbu
2017-04-04 11:00 ` Paolo Bonzini
2017-04-04 11:14 ` Daniel P. Berrange
2017-04-03 12:51 ` Peter Krempa
2017-04-04 13:19 ` Kevin Wolf
2017-04-04 13:27 ` Peter Krempa
2017-04-04 13:54 ` Kevin Wolf
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=20170404121624.GA4536@noname.str.redhat.com \
--to=kwolf@redhat.com \
--cc=Alexandru.Avadanii@enea.com \
--cc=Ciprian.Barbu@enea.com \
--cc=armband@enea.com \
--cc=armbru@redhat.com \
--cc=eblake@redhat.com \
--cc=jcody@redhat.com \
--cc=mreitz@redhat.com \
--cc=pkrempa@redhat.com \
--cc=qemu-devel@nongnu.org \
/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).