Bug 814084

Summary: scsi disk emulation doesn't enforce FUA (Force Unit Access) on writes
Product: Red Hat Enterprise Linux 6 Reporter: Paolo Bonzini <pbonzini>
Component: qemu-kvmAssignee: Paolo Bonzini <pbonzini>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.3CC: acathrow, areis, bcao, bsarathy, dyasny, juzhang, mkenneth, pbonzini, shuang, shu, virt-maint, wdai, wquan
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-kvm-0.12.1.2-2.309.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-21 07:34:02 UTC Type: Bug
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:    
Bug Blocks: 833566    

Description Paolo Bonzini 2012-04-19 08:12:18 UTC
From upstream bug https://bugs.launchpad.net/qemu/+bug/985288

Microsoft NTFS utilizes the FUA bit in SCSI WRITE CDBs to insure integrity when a device advertises that it has write caching enabled. The FUA bit is meant to ensure a write is written to non-volatile storage before returning. This seems to not be enforced by QEMU's SCSI emulation code.

Comment 1 RHEL Program Management 2012-07-10 08:14:25 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 2 RHEL Program Management 2012-07-11 02:06:07 UTC
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development.  This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.

Comment 3 juzhang 2012-07-26 02:04:58 UTC
Hi, Paolo

Would you please provide an efficient way for qe produce/verify this issue? thanks

Comment 4 Paolo Bonzini 2012-08-09 10:48:06 UTC
You can run "strace -e fdatasync -ff /usr/libexec/qemu-kvm ..." (with scsi-hd, not scsi-block) and in the guest do

sg_dd if=/dev/zero of=/dev/sda oflag=fua

Without the patch you should not see any fdatasync call.

Comment 5 juzhang 2012-08-10 03:54:42 UTC
(In reply to comment #4)
> You can run "strace -e fdatasync -ff /usr/libexec/qemu-kvm ..." (with
> scsi-hd, not scsi-block) and in the guest do
> 
> sg_dd if=/dev/zero of=/dev/sda oflag=fua
> 
> Without the patch you should not see any fdatasync call.

Tried with qemu-kvm-302 by using paolo suggestion way, can not find fdatasync call, marked ack+

Comment 8 Shaolong Hu 2012-12-21 05:16:10 UTC
Verified on qemu-kvm-rhev-0.12.1.2-2.348.el6.x86_64:

with steps from comment 4, there is fdatasync calls.

Comment 10 errata-xmlrpc 2013-02-21 07:34:02 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0527.html