[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 16/31] block: Fix open_flags in bdrv_reopen()
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 16/31] block: Fix open_flags in bdrv_reopen() |
Date: |
Wed, 30 Apr 2014 20:23:48 +0200 |
Use the same function as bdrv_open() for determining what the right
flags for bs->file are. Without doing this, a reopen means that
bs->file loses BDRV_O_CACHE_WB or BDRV_O_UNMAP if bs doesn't have it as
well.
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
---
block.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/block.c b/block.c
index 9f6f07e..b749d31 100644
--- a/block.c
+++ b/block.c
@@ -1525,8 +1525,11 @@ BlockReopenQueue *bdrv_reopen_queue(BlockReopenQueue
*bs_queue,
QSIMPLEQ_INIT(bs_queue);
}
+ /* bdrv_open() masks this flag out */
+ flags &= ~BDRV_O_PROTOCOL;
+
if (bs->file) {
- bdrv_reopen_queue(bs_queue, bs->file, flags);
+ bdrv_reopen_queue(bs_queue, bs->file, bdrv_inherited_flags(flags));
}
bs_entry = g_new0(BlockReopenQueueEntry, 1);
--
1.8.3.1
- [Qemu-devel] [PULL 06/31] mirror: Check for bdrv_get_info result, (continued)
- [Qemu-devel] [PULL 06/31] mirror: Check for bdrv_get_info result, Kevin Wolf, 2014/04/30
- [Qemu-devel] [PULL 08/31] block: qemu-iotests: make test 019 and 086 work with spaced pathnames, Kevin Wolf, 2014/04/30
- [Qemu-devel] [PULL 05/31] mirror: Fix resource leak when bdrv_getlength fails, Kevin Wolf, 2014/04/30
- [Qemu-devel] [PULL 10/31] iotests: Discarding compressed clusters on qcow2, Kevin Wolf, 2014/04/30
- [Qemu-devel] [PULL 09/31] qcow2: Fix discard, Kevin Wolf, 2014/04/30
- [Qemu-devel] [PULL 11/31] block: Create bdrv_inherited_flags(), Kevin Wolf, 2014/04/30
- [Qemu-devel] [PULL 12/31] block: Create bdrv_backing_flags(), Kevin Wolf, 2014/04/30
- [Qemu-devel] [PULL 13/31] block: Remove BDRV_O_COPY_ON_READ for bs->file, Kevin Wolf, 2014/04/30
- [Qemu-devel] [PULL 14/31] block: Unlink temporary files in raw-posix/win32, Kevin Wolf, 2014/04/30
- [Qemu-devel] [PULL 15/31] Revert "block: another bdrv_append fix", Kevin Wolf, 2014/04/30
- [Qemu-devel] [PULL 16/31] block: Fix open_flags in bdrv_reopen(),
Kevin Wolf <=
- [Qemu-devel] [PULL 17/31] block: Use error_abort in bdrv_image_info_specific_dump(), Kevin Wolf, 2014/04/30
- [Qemu-devel] [PULL 19/31] block: Use correct width in format strings, Kevin Wolf, 2014/04/30
- [Qemu-devel] [PULL 18/31] qcow2: Avoid overflow in alloc_clusters_noref(), Kevin Wolf, 2014/04/30
- [Qemu-devel] [PULL 20/31] qcow2: Catch bdrv_getlength() error, Kevin Wolf, 2014/04/30
- [Qemu-devel] [PULL 23/31] block/vdi: Error out immediately in vdi_create(), Kevin Wolf, 2014/04/30
- [Qemu-devel] [PULL 22/31] block/bochs: Fix error handling for seek_to_sector(), Kevin Wolf, 2014/04/30
- [Qemu-devel] [PULL 21/31] qcow2: Check min_size in qcow2_grow_l1_table(), Kevin Wolf, 2014/04/30
- [Qemu-devel] [PULL 24/31] curl: Fix long line, Kevin Wolf, 2014/04/30
- [Qemu-devel] [PULL 26/31] curl: Fix return from curl_read_cb with invalid state, Kevin Wolf, 2014/04/30
- [Qemu-devel] [PULL 25/31] curl: Remove unnecessary use of goto, Kevin Wolf, 2014/04/30