Bug 617699

Summary: ext4 and xfs wrong data returned on read after write if file size was changed with ftruncate
Product: [Fedora] Fedora Reporter: Chris Brown <christopher.brown>
Component: kernelAssignee: Eric Sandeen <esandeen>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: low    
Version: 13CC: anton, dougsland, gansalmon, itamar, jonathan, kernel-maint, madhu.chinakonda
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: kernel-2.6.34.6-47.fc13 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-08-30 18:23:31 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 Chris Brown 2010-07-23 18:53:19 UTC
from: https://bugzilla.kernel.org/show_bug.cgi?id=16165 [^]

> we use the direct async I/O API for file I/O in VirtualBox since 3.2 and got
> some reports about corrupted guest filesystems. It turned out that only users
> are affected which disk images are stored on a ext4 filesystem. I could create
> a testcase which reproduces the error. Further investigation showed that the
> data corruption happens if ftruncate is used, data is written to the so far
> unallocated offset and immediately read back. The buffer holding the read data
> contains only \0 afterwards. The data is there if the file is closed and
> another program is used to view the file content (less for example). 
> Everything works if ftruncate is not used.

The test case is in the original bug report, which includes patches
for ext4 and xfs.

Reproducible: Always  
Additional Information  This bug is preventing the usage of ext4 and xfs based filesystems with any
software which uses aio and ftruncate. VirtualBox is is rendered unuseable with
ext4 and XFS filesystems as a result of this bug.

Comment 1 Chuck Ebbert 2010-08-04 02:07:38 UTC
Still not fixed in 2.6.35

Comment 3 Chuck Ebbert 2010-08-04 14:51:51 UTC
Should be fixed in 2.6.34.2-33.fc13

Comment 4 Chuck Ebbert 2010-08-06 19:37:05 UTC
Patches also went in 2.6.35-3.fc14

Comment 5 Fedora Update System 2010-08-07 05:00:38 UTC
kernel-2.6.34.2-34.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/kernel-2.6.34.2-34.fc13

Comment 6 Fedora Update System 2010-08-07 23:28:33 UTC
kernel-2.6.34.2-34.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 kernel'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/kernel-2.6.34.2-34.fc13

Comment 7 Fedora Update System 2010-08-10 23:53:39 UTC
kernel-2.6.34.3-37.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/kernel-2.6.34.3-37.fc13

Comment 8 Fedora Update System 2010-08-11 07:25:59 UTC
kernel-2.6.34.3-37.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 kernel'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/kernel-2.6.34.3-37.fc13

Comment 9 Chuck Ebbert 2010-08-18 09:41:32 UTC
2.6.34 update kernel has been removed.

Comment 10 Fedora Update System 2010-08-27 11:23:24 UTC
kernel-2.6.34.6-47.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/kernel-2.6.34.6-47.fc13

Comment 11 Fedora Update System 2010-08-30 18:22:10 UTC
kernel-2.6.34.6-47.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.