Revision 058fc8c7
b/block/qcow2.c | ||
---|---|---|
998 | 998 |
if (prealloc) { |
999 | 999 |
BlockDriverState *bs; |
1000 | 1000 |
bs = bdrv_new(""); |
1001 |
bdrv_open(bs, filename, BDRV_O_CACHE_WB); |
|
1001 |
bdrv_open(bs, filename, BDRV_O_CACHE_WB | BDRV_O_RDWR);
|
|
1002 | 1002 |
preallocate(bs); |
1003 | 1003 |
bdrv_close(bs); |
1004 | 1004 |
} |
b/block/vvfat.c | ||
---|---|---|
2792 | 2792 |
if (bdrv_create(bdrv_qcow, s->qcow_filename, options) < 0) |
2793 | 2793 |
return -1; |
2794 | 2794 |
s->qcow = bdrv_new(""); |
2795 |
if (s->qcow == NULL || bdrv_open(s->qcow, s->qcow_filename, 0) < 0)
|
|
2795 |
if (s->qcow == NULL || bdrv_open(s->qcow, s->qcow_filename, BDRV_O_RDWR) < 0)
|
|
2796 | 2796 |
return -1; |
2797 | 2797 |
|
2798 | 2798 |
#ifndef _WIN32 |
b/qemu-img.c | ||
---|---|---|
1116 | 1116 |
if (!bs) |
1117 | 1117 |
error("Not enough memory"); |
1118 | 1118 |
|
1119 |
flags = BRDV_O_FLAGS | (unsafe ? BDRV_O_NO_BACKING : 0); |
|
1119 |
flags = BRDV_O_FLAGS | BDRV_O_RDWR | (unsafe ? BDRV_O_NO_BACKING : 0);
|
|
1120 | 1120 |
if (bdrv_open2(bs, filename, flags, NULL) < 0) { |
1121 | 1121 |
error("Could not open '%s'", filename); |
1122 | 1122 |
} |
... | ... | |
1157 | 1157 |
} |
1158 | 1158 |
|
1159 | 1159 |
bs_new_backing = bdrv_new("new_backing"); |
1160 |
if (bdrv_open2(bs_new_backing, out_baseimg, BRDV_O_FLAGS, |
|
1160 |
if (bdrv_open2(bs_new_backing, out_baseimg, BRDV_O_FLAGS | BDRV_O_RDWR,
|
|
1161 | 1161 |
new_backing_drv)) |
1162 | 1162 |
{ |
1163 | 1163 |
error("Could not open new backing file '%s'", backing_name); |
Also available in: Unified diff