mirror of
https://git.proxmox.com/git/qemu
synced 2025-08-07 11:28:46 +00:00
vvfat: Use cache=unsafe
The qcow file used for write support in vvfat is a temporary file, so we can use cache=unsafe there. Without this, write support is just too slow to be of any use. Signed-off-by: Kevin Wolf <mail@kevin-wolf.de>
This commit is contained in:
parent
9217e26f43
commit
a655211ac6
@ -2788,6 +2788,7 @@ static int enable_write_target(BDRVVVFATState *s)
|
|||||||
{
|
{
|
||||||
BlockDriver *bdrv_qcow;
|
BlockDriver *bdrv_qcow;
|
||||||
QEMUOptionParameter *options;
|
QEMUOptionParameter *options;
|
||||||
|
int ret;
|
||||||
int size = sector2cluster(s, s->sector_count);
|
int size = sector2cluster(s, s->sector_count);
|
||||||
s->used_clusters = calloc(size, 1);
|
s->used_clusters = calloc(size, 1);
|
||||||
|
|
||||||
@ -2803,11 +2804,16 @@ static int enable_write_target(BDRVVVFATState *s)
|
|||||||
|
|
||||||
if (bdrv_create(bdrv_qcow, s->qcow_filename, options) < 0)
|
if (bdrv_create(bdrv_qcow, s->qcow_filename, options) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
s->qcow = bdrv_new("");
|
s->qcow = bdrv_new("");
|
||||||
if (s->qcow == NULL ||
|
if (s->qcow == NULL) {
|
||||||
bdrv_open(s->qcow, s->qcow_filename, BDRV_O_RDWR, bdrv_qcow) < 0)
|
return -1;
|
||||||
{
|
}
|
||||||
return -1;
|
|
||||||
|
ret = bdrv_open(s->qcow, s->qcow_filename,
|
||||||
|
BDRV_O_RDWR | BDRV_O_CACHE_WB | BDRV_O_NO_FLUSH, bdrv_qcow);
|
||||||
|
if (ret < 0) {
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
|
Loading…
Reference in New Issue
Block a user