mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
qcow2: Make cache=writethrough default
The performance of qcow2 has improved meanwhile, so we don't need to special-case it any more. Switch the default to write-through caching like all other block drivers. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
fc5b81d1f6
commit
0aa217e461
4 changed files with 3 additions and 16 deletions
|
@ -145,14 +145,6 @@ static int qcow_open(BlockDriverState *bs, const char *filename, int flags)
|
|||
QCowHeader header;
|
||||
uint64_t ext_end;
|
||||
|
||||
/* Performance is terrible right now with cache=writethrough due mainly
|
||||
* to reference count updates. If the user does not explicitly specify
|
||||
* a caching type, force to writeback caching.
|
||||
*/
|
||||
if ((flags & BDRV_O_CACHE_DEF)) {
|
||||
flags |= BDRV_O_CACHE_WB;
|
||||
flags &= ~BDRV_O_CACHE_DEF;
|
||||
}
|
||||
ret = bdrv_file_open(&s->hd, filename, flags);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue