From: Max Reitz <mreitz@redhat.com>
To: Alyssa Milburn <fuzzie@fuzzie.org>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
Markus Armbruster <armbru@redhat.com>,
qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH v2] blockdev: unset inappropriate flags when changing medium
Date: Sat, 6 Feb 2016 15:39:35 +0100 [thread overview]
Message-ID: <56B605A7.8010101@redhat.com> (raw)
In-Reply-To: <20160206133618.GA16635@li141-249.members.linode.com>
[-- Attachment #1: Type: text/plain, Size: 886 bytes --]
On 06.02.2016 14:36, Alyssa Milburn wrote:
> Most importantly, this removes BDRV_O_TEMPORARY, to avoid unlink()ing an
> image which replaces a snapshotted one.
>
> Signed-off-by: Alyssa Milburn <fuzzie@fuzzie.org>
> ---
> blockdev.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/blockdev.c b/blockdev.c
> index be4ca44..a916b06 100644
> --- a/blockdev.c
> +++ b/blockdev.c
> @@ -2514,6 +2514,8 @@ void qmp_blockdev_change_medium(const char *device, const char *filename,
> }
>
> bdrv_flags = blk_get_open_flags_from_root_state(blk);
> + bdrv_flags &= ~(BDRV_O_TEMPORARY | BDRV_O_SNAPSHOT | BDRV_O_NO_BACKING |
> + BDRV_O_PROTOCOL);
>
> if (!has_read_only) {
> read_only = BLOCKDEV_CHANGE_READ_ONLY_MODE_RETAIN;
>
Thanks, applied to my block tree:
https://github.com/XanClic/qemu/commits/block
Max
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
prev parent reply other threads:[~2016-02-06 14:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-06 13:36 [Qemu-devel] [PATCH v2] blockdev: unset inappropriate flags when changing medium Alyssa Milburn
2016-02-06 14:39 ` Max Reitz [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=56B605A7.8010101@redhat.com \
--to=mreitz@redhat.com \
--cc=armbru@redhat.com \
--cc=fuzzie@fuzzie.org \
--cc=kwolf@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.