qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] blockdev: Unset temporary flag when changing medium.
@ 2016-02-04 17:36 Alyssa Milburn
  2016-02-06 13:04 ` [Qemu-devel] [Qemu-block] " Max Reitz
  0 siblings, 1 reply; 4+ messages in thread
From: Alyssa Milburn @ 2016-02-04 17:36 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf, Markus Armbruster, qemu-block

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;
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-02-06 14:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-04 17:36 [Qemu-devel] [PATCH] blockdev: Unset temporary flag when changing medium Alyssa Milburn
2016-02-06 13:04 ` [Qemu-devel] [Qemu-block] " Max Reitz
2016-02-06 13:47   ` Alyssa Milburn
2016-02-06 14:15     ` Max Reitz

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).