diff options
Diffstat (limited to 'block')
-rw-r--r-- | block/qcow2.c | 2 | ||||
-rw-r--r-- | block/vvfat.c | 2 |
2 files changed, 2 insertions, 2 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); } diff --git a/block/vvfat.c b/block/vvfat.c index df957e5ff8..d2787b9e76 100644 --- a/block/vvfat.c +++ b/block/vvfat.c @@ -2792,7 +2792,7 @@ static int enable_write_target(BDRVVVFATState *s) if (bdrv_create(bdrv_qcow, s->qcow_filename, options) < 0) return -1; s->qcow = bdrv_new(""); - if (s->qcow == NULL || bdrv_open(s->qcow, s->qcow_filename, 0) < 0) + if (s->qcow == NULL || bdrv_open(s->qcow, s->qcow_filename, BDRV_O_RDWR) < 0) return -1; #ifndef _WIN32 |