Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 545194

Summary: Discrepancy between man page and source code for qcow2 with regards to default value used when no explicit caching is specified
Product: Red Hat Enterprise Linux 5 Reporter: Nandini Chandra <nachandr>
Component: kvmAssignee: Kevin Wolf <kwolf>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.4CC: ehabkost, juzhang, lihuang, llim, tao, tburke, virt-maint, ykaul
Target Milestone: rc   
Target Release: 5.4   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: kvm-83-143.el5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-03-30 07:55:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Nandini Chandra 2009-12-07 20:25:18 UTC
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:

Comment 2 Dor Laor 2009-12-13 08:51:30 UTC
You're right, we fixed the code but not the documentation

Comment 8 juzhang 2010-01-18 08:54:44 UTC
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.

Comment 9 juzhang 2010-01-20 05:36:06 UTC
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

Comment 13 errata-xmlrpc 2010-03-30 07:55:13 UTC
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