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 612507

Summary: qcow2 image corruption when using cache=writeback
Product: Red Hat Enterprise Linux 5 Reporter: RHEL Program Management <pm-rhel>
Component: kvmAssignee: Virtualization Maintenance <virt-maint>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: high    
Version: 5.5CC: chellwig, cpelland, cward, ehabkost, kwolf, lihuang, llim, michen, mkenneth, ndai, plyons, pm-eus, qzhang, tburke, virt-maint, ykaul
Target Milestone: rcKeywords: OtherQA, ZStream
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: kvm-83-164.el5_5.15 Doc Type: Bug Fix
Doc Text:
Following writing metadata to a QCOW2 disk image, metadata was not flushed, which could have potentially caused the disk image to become corrupted in the event of system disruption (such as a power outage). With this update, metadata is flushed after being written, thus increasing QCOW2 image integrity, and decreasing the likelihood of image corruption.
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-07-29 05:49:51 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:
Bug Depends On: 572825    
Bug Blocks:    

Description RHEL Program Management 2010-07-08 12:09:06 UTC
This bug has been copied from bug #572825 and has been proposed
to be backported to 5.5 z-stream (EUS).

Comment 10 Eduardo Habkost 2010-07-23 19:06:12 UTC
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.

New Contents:
Cause: qcow2 code didn't flush metadata writes, risking integrity on case of crashes.

Consequence: http://wiki.qemu.org/Features/Qcow2DataIntegrity#Metadata_update_ordering.2C_Part_2

Fix: Flush after metadata writes. Use bdrv_(p)write_sync for metadata writes.

Result: qcow2 data integrity after host crashes is improved.

Comment 11 Douglas Silas 2010-07-28 15:42:01 UTC
Technical note updated. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.

Diffed Contents:
@@ -1,7 +1 @@
-Cause: qcow2 code didn't flush metadata writes, risking integrity on case of crashes.
+Following writing metadata to a QCOW2 disk image, metadata was not flushed, which could have potentially caused the disk image to become corrupted in the event of system disruption (such as a power outage). With this update, metadata is flushed after being written, thus increasing QCOW2 image integrity, and decreasing the likelihood of image corruption.-
-Consequence: http://wiki.qemu.org/Features/Qcow2DataIntegrity#Metadata_update_ordering.2C_Part_2
-
-Fix: Flush after metadata writes. Use bdrv_(p)write_sync for metadata writes.
-
-Result: qcow2 data integrity after host crashes is improved.

Comment 12 errata-xmlrpc 2010-07-29 05:49:51 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/RHBA-2010-0536.html