[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PULL 31/34] blockdev: unset inappropriate flags when chang
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PULL 31/34] blockdev: unset inappropriate flags when changing medium |
Date: |
Mon, 22 Feb 2016 17:32:49 +0100 |
From: Alyssa Milburn <address@hidden>
Most importantly, this removes BDRV_O_TEMPORARY, to avoid unlink()ing an
image which replaces a snapshotted one.
Signed-off-by: Alyssa Milburn <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>
---
blockdev.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/blockdev.c b/blockdev.c
index 5c02a42..d4bc435 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -2513,6 +2513,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;
--
1.8.3.1
- [Qemu-block] [PULL 16/34] throttle: Make throttle_max_is_missing_limit() set errp, (continued)
- [Qemu-block] [PULL 16/34] throttle: Make throttle_max_is_missing_limit() set errp, Kevin Wolf, 2016/02/22
- [Qemu-block] [PULL 30/34] MAINTAINERS: Add myself as maintainer of the throttling code, Kevin Wolf, 2016/02/22
- [Qemu-block] [PULL 20/34] throttle: Use throttle_config_init() to initialize ThrottleConfig, Kevin Wolf, 2016/02/22
- [Qemu-block] [PULL 21/34] throttle: Add support for burst periods, Kevin Wolf, 2016/02/22
- [Qemu-block] [PULL 19/34] throttle: Merge all functions that check the configuration into one, Kevin Wolf, 2016/02/22
- [Qemu-block] [PULL 23/34] qapi: Add burst length parameters to block_set_io_throttle, Kevin Wolf, 2016/02/22
- [Qemu-block] [PULL 25/34] throttle: Check that burst_level leaks correctly, Kevin Wolf, 2016/02/22
- [Qemu-block] [PULL 29/34] docs: Document the throttling infrastructure, Kevin Wolf, 2016/02/22
- [Qemu-block] [PULL 26/34] throttle: Test throttle_compute_wait() during bursts, Kevin Wolf, 2016/02/22
- [Qemu-block] [PULL 28/34] qapi: Correct the name of the iops_rd parameter, Kevin Wolf, 2016/02/22
- [Qemu-block] [PULL 31/34] blockdev: unset inappropriate flags when changing medium,
Kevin Wolf <=
- [Qemu-block] [PULL 33/34] qemu-iotests: 140: don't use IDE device, Kevin Wolf, 2016/02/22
- [Qemu-block] [PULL 27/34] qemu-iotests: Extend iotest 093 to test bursts, Kevin Wolf, 2016/02/22
- [Qemu-block] [PULL 32/34] qemu-iotests: 067: ignore QMP events, Kevin Wolf, 2016/02/22
- [Qemu-block] [PULL 34/34] qemu-iotests: 140: make description slightly more verbose, Kevin Wolf, 2016/02/22
- Re: [Qemu-block] [Qemu-devel] [PULL 00/34] Block layer patches, Peter Maydell, 2016/02/22