Description of problem: While explaining kvm's specification on block I/O data integrity to customer,we found some discrepancy between man page and how the code works for qcow2 disk images. According to man page (man qemu-kvm),if no explicit caching is specified for a qcow2 disk image, cache=writeback will be used. From the source code, ./qemu/block-qcow2.c 277 /* We default to NO CACHE if nothing is defined */ 278 if ((flags & BDRV_O_CACHE_DEF)) { 279 flags |= BDRV_O_NOCACHE; 280 flags &= ~BDRV_O_CACHE_DEF; 281 } From the source code,it seems like a default value of NO CACHE is used for qcow2 disk images. Version-Release number of selected component (if applicable): RHEL5 kvm-83-105.el5_4.9 How reproducible: NA Steps to Reproduce: 1. 2. 3. Actual results: There is a discrepancy between man pages and how the code works for qcow2 images with regards to default value used when no explicit caching is specified. Expected results: There should be no discrepancy between man pages and how the code works for qcow2 images with regards to default value used when no explicit caching is specified. Additional info:
You're right, we fixed the code but not the documentation
Tested on kvm-83-147.el5. pass. steps: 1.man qemu-kvm: By default, if no explicit caching is specified for a qcow2 disk image, cache=none will be used. For all other disk types,cache=writethrough is the default.
Reproduced on kvm-83-135.el5.fail. Tested on kvm-83-147.el5. pass. 1), Reproduced on on kvm-83-135.el5. fail. steps: 1.man qemu-kvm: By default, if no explicit caching is specified for a qcow2 disk image, cache=writeback will be used. For all other disk types, cache=writethrough is the default. 2),Tested on kvm-83-147.el5. pass. steps: 1.man qemu-kvm: By default, if no explicit caching is specified for a qcow2 disk image,cache=none will be used. For all other disk types,cache=writethrough is the default
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2010-0271.html