Bug 605757

Summary: 2tb virtio disk gets massively corrupted filesystems
Product: [Fedora] Fedora Reporter: Dennis Gilmore <dennis>
Component: qemuAssignee: Justin M. Forbes <jforbes>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: low    
Version: 13CC: amit.shah, berrange, dwmw2, ehabkost, gcosta, itamar, jaswinder, jforbes, knoel, markmc, michael.hagmann, ondrejj, scottt.tw, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: seabios-0.6.0-1.fc13 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-08-24 17:07:57 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description Dennis Gilmore 2010-06-18 13:39:09 EDT
Description of problem:
with a 2 tb filesystem attached to a virt guest using virtio im seeing very quickly massive file system corruption.  there is no IO errors on the host or the guest. 

talking to danpb in irc it looks related to  http://www.mail-archive.com/qemu-devel@nongnu.org/msg32499.html  dan also commented on finding other patches related to disk > 1t

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Daniel Berrange 2010-06-18 13:55:43 EDT
Trawling the upstream QEMU GIT logs for patches to the block layer that are not in 0.12.3, I see some changesets that look like they'd be valuable in avoiding data corruption. The mailing list thread suggests they impact large disks

commit cbf1dff2f1033cadcb15c0ffc9c0a3d039d8ed42
Author: Kevin Wolf <kwolf@redhat.com>
Date:   Fri May 21 11:09:42 2010 +0200

    block: Fix multiwrite with overlapping requests
    
    With overlapping requests, the total number of sectors is smaller than the sum
    of the nb_sectors of both requests.
    
    Signed-off-by: Kevin Wolf <kwolf@redhat.com>


commit 77be4366baface6613cfc312ba281f8e5860997c
Author: Christoph Hellwig <hch@lst.de>
Date:   Wed May 19 20:53:10 2010 +0200

    block: fix sector comparism in multiwrite_req_compare
    
    The difference between the start sectors of two requests can be larger
    than the size of the "int" type, which can lead to a not correctly
    sorted multiwrite array and thus spurious I/O errors and filesystem
    corruption due to incorrect request merges.
    
    So instead of doing the cute sector arithmetics trick spell out the
    exact comparisms.
    
    Spotted by Kevin Wolf based on a testcase from Michael Tokarev.


commit 618fbb84299780af96e3d4c4b6f2148656fe3708
Author: Christoph Hellwig <hch@lst.de>
Date:   Wed May 19 12:40:09 2010 +0200

    virtio-blk: fix barrier support
    
    Before issuing the barrier to the block driver we need to flush our oustanding
    queue of write requests, as the flush is supposed to be issued after them.
    
    Signed-off-by: Christoph Hellwig <hch@lst.de>
    Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Comment 2 Fedora Update System 2010-08-18 10:02:30 EDT
seabios-0.6.0-1.fc13,gpxe-1.0.1-1.fc13,qemu-0.12.5-1.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/seabios-0.6.0-1.fc13,gpxe-1.0.1-1.fc13,qemu-0.12.5-1.fc13
Comment 3 Fedora Update System 2010-08-19 22:16:25 EDT
seabios-0.6.0-1.fc13, gpxe-1.0.1-1.fc13, qemu-0.12.5-1.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update seabios gpxe qemu'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/seabios-0.6.0-1.fc13,gpxe-1.0.1-1.fc13,qemu-0.12.5-1.fc13
Comment 4 Fedora Update System 2010-08-24 17:07:35 EDT
seabios-0.6.0-1.fc13, gpxe-1.0.1-1.fc13, qemu-0.12.5-1.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 5 Chuck Ebbert 2010-08-27 12:37:55 EDT
*** Bug 626684 has been marked as a duplicate of this bug. ***
Comment 6 Michael Hagmann 2010-08-27 16:36:34 EDT
*** Bug 624293 has been marked as a duplicate of this bug. ***
Comment 7 Michael Hagmann 2010-08-29 12:34:10 EDT
*** Bug 612036 has been marked as a duplicate of this bug. ***