[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-discuss] Disk Caching when domain is suspended.
From: |
Matthew Schumacher |
Subject: |
Re: [Qemu-discuss] Disk Caching when domain is suspended. |
Date: |
Wed, 14 Nov 2018 13:01:12 -0900 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 |
On 11/14/18 11:50 AM, Matthew Schumacher wrote:
Qemu devs,
I have a process where I suspend a domain, then migrate some of it's
disk elsewhere, then live migrate (to copy cpu state and memory) the
domain to another host and resume. The migration is marked unsafe in
libvirt because disk caching is enabled even though the domain is in
the suspend state.
Can someone confirm that the disk cache is flushed as part of the
suspend process? If not, it seems reasonable that you would want the
disk completely quiesced while the domain was in the suspend state so
that you can perform tasks without worry that the disk is still changing.
Thanks,
schu
I found this code in cpus.c
static int do_vm_stop(RunState state, bool send_stop)
{
int ret = 0;
if (runstate_is_running()) {
cpu_disable_ticks();
pause_all_vcpus();
runstate_set(state);
vm_state_notify(0, state);
if (send_stop) {
qapi_event_send_stop(&error_abort);
}
}
bdrv_drain_all();
replay_disable_events();
ret = bdrv_flush_all();
return ret;
}
That would lead me to believe that it does flush the cache with
bdrv_drain_all and bdrv_flush_all, but I'm not entirely sure without a
bit of code analysis, so a quick confirmation would be welcome.
Thanks,
schu