aboutsummaryrefslogtreecommitdiff
path: root/block/qcow2.c
diff options
context:
space:
mode:
authorNaphtali Sprei <nsprei@redhat.com>2010-01-21 14:40:39 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2010-01-26 15:42:01 -0600
commit058fc8c768f81f9140db511171185dc8e0676163 (patch)
tree2638db9a159c0b89d15882bfa43606fc1f6e75cc /block/qcow2.c
parent37226ad946597126f5bce36f75f818b12fe4b5b8 (diff)
Ask for read-write permissions when opening files
Found some places that seems needs this explicitly, now that read-write is not the default. Signed-off-by: Naphtali Sprei <nsprei@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'block/qcow2.c')
-rw-r--r--block/qcow2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/qcow2.c b/block/qcow2.c
index 8fc8f8cc37..8c220ecdc5 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -998,7 +998,7 @@ exit:
if (prealloc) {
BlockDriverState *bs;
bs = bdrv_new("");
- bdrv_open(bs, filename, BDRV_O_CACHE_WB);
+ bdrv_open(bs, filename, BDRV_O_CACHE_WB | BDRV_O_RDWR);
preallocate(bs);
bdrv_close(bs);
}