qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
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 15:19:02 +0200	[thread overview]
Message-ID: <20170404131902.GB4536@noname.str.redhat.com> (raw)
In-Reply-To: <20170403125148.GX26598@andariel.pipo.sk>

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

Am 03.04.2017 um 14:51 hat Peter Krempa geschrieben:
> On Mon, Apr 03, 2017 at 10:15:42 +0200, Kevin Wolf wrote:
> > Am 31.03.2017 um 19:43 hat Max Reitz geschrieben:
> > > On 31.03.2017 18:03, Ciprian Barbu wrote:
> 
> [...]
> 
> > > So this doesn't work:
> > > 
> > > $ x86_64-softmmu/qemu-system-x86_64 \
> > >     -blockdev node-name=image,driver=qcow2,\
> > > file.driver=file,file.filename=foo.qcow2 \
> > >     -device virtio-blk,drive=image \
> > >     -qmp stdio
> > > {"QMP": {"version": {"qemu": {"micro": 92, "minor": 8, "major": 2},
> > > "package": " (v2.8.0-2038-g6604c893d0)"}, "capabilities": []}}
> > > {'execute':'qmp_capabilities'}
> > > {"return": {}}
> > > {'execute':'nbd-server-start','arguments':{'addr':{'type':'inet','data':{'host':'localhost','port':'10809'}}}}
> > > {"return": {}}
> > > {'execute':'nbd-server-add','arguments':{'device':'image','writable':true}}
> > > {"error": {"class": "GenericError", "desc": "Conflicts with use by
> > > /machine/peripheral-anon/device[0]/virtio-backend as 'root', which does
> > > not allow 'write' on image"}
> > > 
> > > But this works:
> > > 
> > > $ x86_64-softmmu/qemu-system-x86_64 \
> > >     -blockdev node-name=image,driver=qcow2,\
> > > file.driver=file,file.filename=foo.qcow2 \
> > >     -device virtio-blk,drive=image,share-rw=on \
> > >     -qmp stdio
> > > {"QMP": {"version": {"qemu": {"micro": 92, "minor": 8, "major": 2},
> > > "package": " (v2.8.0-2038-g6604c893d0)"}, "capabilities": []}}
> > > {'execute':'qmp_capabilities'}
> > > {"return": {}}
> > > {'execute':'nbd-server-start','arguments':{'addr':{'type':'inet','data':{'host':'localhost','port':'10809'}}}}
> > > {"return": {}}
> > > {'execute':'nbd-server-add','arguments':{'device':'image','writable':true}}
> > > {"return": {}}
> > > 
> > > (The difference is the share-rw=on in the -device parameter.)
> > > 
> > > So in theory all that's necessary is to set share-rw=on for the device
> > > in the management layer. But I'm not sure whether that's practical.
> > 
> > Yes, libvirt needs to provide this option if the guest supports sharing.
> > If it doesn't support sharing, rejecting a read-write NBD client seems
> > correct to me.
> > 
> > Peter, Eric, what is the status on the libvirt side here?
> 
> Libvirt currently uses the NBD server only for non-shared storage
> migration. At that point the disk is not shared (while qemu may think
> so) since the other side is not actually running until the mirror
> reaches synchronized state.

Yes, I misunderstood the situation at first.

Anyway, is there already a libvirt patch for the cases where the image
is actually shared?

Kevin

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2017-04-04 13:19 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
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 [this message]
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=20170404131902.GB4536@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).