[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 15/30] block: Disable BDRV_O_COPY_ON_READ for the bac
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 15/30] block: Disable BDRV_O_COPY_ON_READ for the backing file |
Date: |
Thu, 31 Oct 2013 16:48:29 +0100 |
From: Thibaut LAURENT <address@hidden>
Since commit 0ebd24e0a203cf2852c310b59fbe050190dc6c8c,
bdrv_open_common will throw an error when trying to open a file
read-only with the BDRV_O_COPY_ON_READ flag set.
Although BDRV_O_RDWR is unset for the backing files,
BDRV_O_COPY_ON_READ is still passed on if copy-on-read was requested
for the drive. Let's unset this flag too before opening the backing
file, or bdrv_open_common will fail.
Signed-off-by: Thibaut LAURENT <address@hidden>
Reviewed-by: Benoit Canet <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/block.c b/block.c
index 366999b..61795fe 100644
--- a/block.c
+++ b/block.c
@@ -999,7 +999,8 @@ int bdrv_open_backing_file(BlockDriverState *bs, QDict
*options, Error **errp)
}
/* backing files always opened read-only */
- back_flags = bs->open_flags & ~(BDRV_O_RDWR | BDRV_O_SNAPSHOT);
+ back_flags = bs->open_flags & ~(BDRV_O_RDWR | BDRV_O_SNAPSHOT |
+ BDRV_O_COPY_ON_READ);
ret = bdrv_open(bs->backing_hd,
*backing_filename ? backing_filename : NULL, options,
--
1.8.1.4
- [Qemu-devel] [PULL 03/30] qcow2: Unset zero_beyond_eof in save_vmstate, (continued)
- [Qemu-devel] [PULL 03/30] qcow2: Unset zero_beyond_eof in save_vmstate, Kevin Wolf, 2013/10/31
- [Qemu-devel] [PULL 06/30] qemu-iotests: Test for loading VM state from qcow2, Kevin Wolf, 2013/10/31
- [Qemu-devel] [PULL 07/30] qcow2: Flush image after creation, Kevin Wolf, 2013/10/31
- [Qemu-devel] [PULL 09/30] ide-test: Check what happens with bus mastering disabled, Kevin Wolf, 2013/10/31
- [Qemu-devel] [PULL 10/30] tests: Multiboot mmap test case, Kevin Wolf, 2013/10/31
- [Qemu-devel] [PULL 11/30] block: Don't copy backing file name on error, Kevin Wolf, 2013/10/31
- [Qemu-devel] [PULL 08/30] exec: Fix bounce buffer allocation in address_space_map(), Kevin Wolf, 2013/10/31
- [Qemu-devel] [PULL 12/30] sheepdog: explicitly set copies as type uint8_t, Kevin Wolf, 2013/10/31
- [Qemu-devel] [PULL 14/30] ahci: fix win7 hang on boot, Kevin Wolf, 2013/10/31
- [Qemu-devel] [PULL 13/30] sheepdog: pass copy_policy in the request, Kevin Wolf, 2013/10/31
- [Qemu-devel] [PULL 15/30] block: Disable BDRV_O_COPY_ON_READ for the backing file,
Kevin Wolf <=
- [Qemu-devel] [PULL 16/30] block: Avoid unecessary drv->bdrv_getlength() calls, Kevin Wolf, 2013/10/31
- [Qemu-devel] [PULL 17/30] qemu-iotests: Fix 051 reference output, Kevin Wolf, 2013/10/31
- [Qemu-devel] [PULL 18/30] qemu-iotests: drop duplicated "create_image", Kevin Wolf, 2013/10/31
- [Qemu-devel] [PULL 19/30] qemu-iotests: Test case for backing file deletion, Kevin Wolf, 2013/10/31
- [Qemu-devel] [PULL 20/30] sheepdog: check return values of qemu_co_recv/send correctly, Kevin Wolf, 2013/10/31
- [Qemu-devel] [PULL 21/30] sheepdog: handle vdi objects in resend_aio_req, Kevin Wolf, 2013/10/31
- [Qemu-devel] [PULL 22/30] sheepdog: reload inode outside of resend_aioreq, Kevin Wolf, 2013/10/31
- [Qemu-devel] [PULL 23/30] coroutine: add co_aio_sleep_ns() to allow sleep in block drivers, Kevin Wolf, 2013/10/31
- [Qemu-devel] [PULL 24/30] sheepdog: try to reconnect to sheepdog after network error, Kevin Wolf, 2013/10/31
- [Qemu-devel] [PULL 25/30] sheepdog: make add_aio_request and send_aioreq void functions, Kevin Wolf, 2013/10/31