All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bug 16165] New: Wrong data returned on read after write if file size was changed with ftruncate before
@ 2010-06-08 22:01 bugzilla-daemon
  2010-06-08 22:25 ` [Bug 16165] " bugzilla-daemon
                   ` (28 more replies)
  0 siblings, 29 replies; 30+ messages in thread
From: bugzilla-daemon @ 2010-06-08 22:01 UTC (permalink / raw)
  To: linux-ext4

https://bugzilla.kernel.org/show_bug.cgi?id=16165

           Summary: Wrong data returned on read after write if file size
                    was changed with ftruncate before
           Product: File System
           Version: 2.5
    Kernel Version: at least up to 2.6.34
          Platform: All
        OS/Version: Linux
              Tree: Mainline
            Status: NEW
          Severity: normal
          Priority: P1
         Component: ext4
        AssignedTo: fs_ext4@kernel-bugs.osdl.org
        ReportedBy: Alexander.Eichner@sun.com
        Regression: No


Created an attachment (id=26701)
 --> (https://bugzilla.kernel.org/attachment.cgi?id=26701)
Testcase showing the corruption

Hi,

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 same testcase with ftruncate works on ext3 here. A simple testcase is
attached.

Compile with: gcc -D_GNU_SOURCE -o aio_corrupt aio_corrupt.c -laio
Usage: aio_corrupt <path/to/the/file>

Expected output: Success!
Output on ext3: Success!
Output on ext4: Corrupted buffer!

Kind regards,
Alexander Eichner

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2012-07-20 12:58 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-08 22:01 [Bug 16165] New: Wrong data returned on read after write if file size was changed with ftruncate before bugzilla-daemon
2010-06-08 22:25 ` [Bug 16165] " bugzilla-daemon
2010-06-08 22:27 ` bugzilla-daemon
2010-06-08 22:29 ` bugzilla-daemon
2010-06-08 22:38 ` bugzilla-daemon
2010-06-09 15:26 ` bugzilla-daemon
2010-06-09 15:49 ` bugzilla-daemon
2010-06-09 22:57 ` bugzilla-daemon
2010-06-10  7:38 ` bugzilla-daemon
2010-06-11 14:26 ` bugzilla-daemon
2010-06-16  8:19 ` bugzilla-daemon
2010-06-18 15:13 ` bugzilla-daemon
2010-06-18 15:30 ` bugzilla-daemon
2010-06-19 18:10 ` bugzilla-daemon
2010-06-19 18:12 ` bugzilla-daemon
2010-06-24 15:53 ` bugzilla-daemon
2010-06-24 22:20 ` bugzilla-daemon
2010-06-27  9:05 ` bugzilla-daemon
2010-07-23 21:45 ` bugzilla-daemon
2010-07-23 21:51 ` bugzilla-daemon
2010-07-23 22:09 ` bugzilla-daemon
2010-08-04  2:06 ` bugzilla-daemon
2010-08-04  3:40 ` bugzilla-daemon
2010-08-16 13:24 ` bugzilla-daemon
2010-08-16 19:26 ` bugzilla-daemon
2010-08-16 19:59 ` bugzilla-daemon
2010-11-04 11:00 ` bugzilla-daemon
2011-01-10 12:40 ` bugzilla-daemon
2011-04-23 17:42 ` bugzilla-daemon
2012-07-20 12:58 ` bugzilla-daemon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.