All of lore.kernel.org
 help / color / mirror / Atom feed
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] blockdev: Unset temporary flag when changing medium.
Date: Sat, 6 Feb 2016 14:04:23 +0100	[thread overview]
Message-ID: <56B5EF57.2080301@redhat.com> (raw)
In-Reply-To: <20160204173639.GA5772@li141-249.members.linode.com>

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

On 04.02.2016 18:36, Alyssa Milburn wrote:
> This avoids a 'change' command from the monitor unlink()ing the new
> file if the bdrv was previously snapshotted.
> 
> Signed-off-by: Alyssa Milburn <fuzzie@fuzzie.org>
> ---
>  blockdev.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/blockdev.c b/blockdev.c
> index be4ca44..d39c2e6 100644
> --- a/blockdev.c
> +++ b/blockdev.c
> @@ -2514,6 +2514,7 @@ 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;
>  
>      if (!has_read_only) {
>          read_only = BLOCKDEV_CHANGE_READ_ONLY_MODE_RETAIN;
> 

This patch is correct (thanks!), but I think we want to unset even more
flags, namely BDRV_O_SNAPSHOT, BDRV_O_NO_BACKING, and BDRV_O_PROTOCOL.

Max


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2016-02-06 13:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-04 17:36 [Qemu-devel] [PATCH] blockdev: Unset temporary flag when changing medium Alyssa Milburn
2016-02-06 13:04 ` Max Reitz [this message]
2016-02-06 13:47   ` [Qemu-devel] [Qemu-block] " Alyssa Milburn
2016-02-06 14:15     ` Max Reitz

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=56B5EF57.2080301@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.