The xfstests test suite found this one. On a local gfs2 filesystem, on kernel-2.6.18-149.el5: xfs_io -F -f -d -t -c "pwrite -S 0x63 0 65536" \ -c "truncate 1" \ -c "pwrite -S 0x41 65536 65536" \ -c "pread -v 0 131072" \ /mnt/scratch/tryit This will write a "0x63" pattern from 0 to 65536, truncate to 1 byte, write a "0x41" pattern from 65536->131072, and then read back the entire file - all with O_DIRECT. We should get 0s from byte 1 through byte 65536; on gfs2 we get the old data (0x63): # dd if=/mnt/scratch/tryit iflag=direct | hexdump -C 00000000 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 |cccccccccccccccc| * 00001000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00010000 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 |AAAAAAAAAAAAAAAA| * 00020000 A buffered read gets what we expect: # dd if=/mnt/scratch/tryit | hexdump -C 00000000 63 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |c...............| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00010000 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 |AAAAAAAAAAAAAAAA| * 00020000 Confirmed upstream as well. -Eric
Created attachment 346988 [details] Guesstimate fix Does this fix the issue?
The patch in comment #1 is now in upstream. The fix is trivial and we should try and do this for 5.4
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release.
Also tested on RHEL as well as upstream now.
in kernel-2.6.18-156.el5 You can download this test kernel from http://people.redhat.com/dzickus/el5 Please do NOT transition this bugzilla state to VERIFIED until our QE team has sent specific instructions indicating when to do so. However feel free to provide a comment indicating that this fix has been verified.
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/RHSA-2009-1243.html