Hi, I have deploy a guest use qemu+virtio on Host centos7, some info as follows
# cat /etc/centos-release
CentOS Linux release 7.2.1511 (Core)
# uname -a
xxxxxxx 3.10.0-327.el7.x86_64 #1 SMP Thu Nov 19 22:10:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
# /usr/libexec/qemu-kvm --version
QEMU emulator version 1.5.3 (qemu-kvm-1.5.3-105.el7_2.7), Copyright (c) 2003-2008 Fabrice Bellard
Follow is my guest 'lvm-20660' xml section
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
<disk type='block' device='disk'>
<driver name='qemu' type='raw' cache='none' io='native'/>
<source dev='/dev/centos/lvqrogm'/>
<target dev='vda' bus='virtio'/>
</disk>
Is the field [cache='none/writethrough/writeback/...'] controls how and when qemu send a flush request?
And I want to know on what conditions qemu will send a write-back request to flush the data on disk?, Is this auto?
moreover, I try to use virsh to seek the count of flush operations
# virsh domstats lvm-20660 --block
Domain: 'lvm-20660'
block.count=2
block.0.path=/dev/centos/lvqrogm
block.0.rd.reqs=6157
block.0.rd.bytes=129625088
block.0.rd.times=4149553967
block.0.wr.reqs=3499
block.0.wr.bytes=20336640
block.0.wr.times=1079496151
block.0.fl.reqs=1774
block.0.fl.times=281026726
....
As above, 1774 is the qemu sent the number of flush?
Sorry I wrote a little mess