From: Kevin Wolf <kwolf@redhat.com>
To: "Daniel P. Berrangé" <berrange@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 13:42:11 +0100 [thread overview]
Message-ID: <20180212124211.GC5103@localhost.localdomain> (raw)
In-Reply-To: <20180212100247.GG4071@redhat.com>
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...)
I don't know if libvirt takes care to remove a potentially already
created file if the command then fails, but hopefully it does and the
patch is not actually needed with libvirt.
Kevin
next prev parent reply other threads:[~2018-02-12 12:42 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 ` Kevin Wolf [this message]
2018-02-12 12:49 ` [Qemu-devel] [Qemu-block] " Daniel P. Berrangé
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=20180212124211.GC5103@localhost.localdomain \
--to=kwolf@redhat.com \
--cc=berrange@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.