Verification steps:
1.qemu-img  create -f  qcow2 data1.img 10M
  qemu-img  create -f  qcow2 -b data1.img data1.qcow2

2.write 1M data to data1.img

3.create vm  use data1.qcow2 as the data disk
  /usr/libexec/qemu-kvm -M pc,accel=kvm -smp 4 -cpu host -m 4g -drive
  file=./centos_7.5_64_20200603.qcow2,if=none,id=drive-virtio0,cache=none,
  aio=native -device virtio-blk-pci,drive=drive-virtio0,id=virtio0 -drive
  file=./data1.qcow2,if=none,id=drive-virtio1,cache=none,l2-cache-size=
  1048576,aio=native -device virtio-blk-pci,drive=drive-virtio1,id=virtio1
  -vnc :101 -qmp stdio

4.{"execute": "block-stream", "arguments":{"device":"drive-virtio1"}}

5.kill -9 $(pidof qemu-kvm)

6.md5sum data1.img data1.qcow2,check if it is the same


Evanzhang (1):
  block/stream:add flush l2_table_cache,ensure data integrity

 block/stream.c | 6 ++++++
 1 file changed, 6 insertions(+)

-- 
2.9.5


Reply via email to