From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
qemu-devel@nongnu.org, qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH] block: early check for blockers on drive-mirror
Date: Mon, 12 Feb 2018 12:49:32 +0000 [thread overview]
Message-ID: <20180212124932.GO4071@redhat.com> (raw)
In-Reply-To: <20180212124211.GC5103@localhost.localdomain>
On Mon, Feb 12, 2018 at 01:42:11PM +0100, Kevin Wolf wrote:
> Am 12.02.2018 um 11:02 hat Daniel P. Berrangé geschrieben:
> > On Mon, Feb 12, 2018 at 10:58:31AM +0100, Paolo Bonzini wrote:
> > > On 10/02/2018 00:07, John Snow wrote:
> > > >> + /* Early check to avoid creating target */
> > > >> + if (bdrv_op_is_blocked(bs, BLOCK_OP_TYPE_MIRROR_SOURCE, errp)) {
> > > >> + return;
> > > >> + }
> > > >> +
> > > >> aio_context = bdrv_get_aio_context(bs);
> > > >> aio_context_acquire(aio_context);
> > > >>
> > > >>
> > > > What's the implication of the temporarily-extant target node that it
> > > > needs to be avoided so strictly?
> > > >
> > >
> > > Creating a file on disk, that no one will ever remvoe. :)
> >
> > Fortunately libvirt's SELinux policy will probably prevent QEMU creating
> > it in the first place :-)
>
> Well, calling drive-mirror without allowing QEMU to create the target
> image would be a bit pointless, so I think we can assume that libvirt
> did set up the file permission so that QEMU can create it. (Unless
> mode=existing is used, but I understand that libvirt doesn't want to
> create images with qemu-img, so that doesn't seem to be the case...)
We use either mode=existing or mode=absolute-paths depending on what
the mgmt app asked for in the API call to libvirt. I'm still kind of
suprised if mode=absolute-paths will work because we ought to be
blocking the creation of the file AFAIK and we can't pre-label a file
that doesn't exist yet.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
prev parent reply other threads:[~2018-02-12 12:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-07 16:29 [Qemu-devel] [PATCH] block: early check for blockers on drive-mirror Paolo Bonzini
2018-02-08 1:17 ` Fam Zheng
2018-02-08 10:10 ` [Qemu-devel] [Qemu-block] " Alberto Garcia
2018-02-08 10:38 ` Paolo Bonzini
2018-02-08 12:41 ` Alberto Garcia
2018-02-09 15:36 ` Kevin Wolf
2018-02-09 23:07 ` [Qemu-devel] " John Snow
2018-02-12 9:58 ` Paolo Bonzini
2018-02-12 10:02 ` Daniel P. Berrangé
2018-02-12 12:42 ` [Qemu-devel] [Qemu-block] " Kevin Wolf
2018-02-12 12:49 ` Daniel P. Berrangé [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=20180212124932.GO4071@redhat.com \
--to=berrange@redhat.com \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--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 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.