qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Way to force sync disk with cache=unsafe


From: Narcis Garcia
Subject: Re: Way to force sync disk with cache=unsafe
Date: Mon, 13 Nov 2023 08:31:53 +0100

I think that "cache=unsafe" option it only allows writing data to be included in host's disk cache behaviour. Assuming this, if I'm not wrong, when you flush host's disk cache you are already syncing the pending writings from Qemu.

To flush at VM hosting level to disk:
$ sync

Remember that a VM can keep its own disk cache pending to write (pending to send to host as disk writings). You may want to flush first at VM level and, after this, flushing at host level.

El 12/11/23 a les 17:11, YunQiang Su ha escrit:
I have a VM for source code building and running unittest.
The data in it is not critical generally. So I use "cache=unsafe" for it.

But I find that sometimes, I wish that I can force the data sync, for example
when a big project is finished to build.

A method I am using is to shutdown the VM and restart it.

Do we have any other better way to do so?


--
Narcis Garcia



reply via email to

[Prev in Thread] Current Thread [Next in Thread]