Bug 501082 - RHEL5.4 ext4: backport corruption fixes from .30
RHEL5.4 ext4: backport corruption fixes from .30
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel (Show other bugs)
5.4
All Linux
medium Severity medium
: rc
: ---
Assigned To: Eric Sandeen
Red Hat Kernel QE team
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-15 17:53 EDT by Eric Sandeen
Modified: 2009-09-03 09:57 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-02 04:45:09 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Eric Sandeen 2009-05-15 17:53:30 EDT
A handful of corruption fixes are in the .30 tree and should be backported to the ext4 tech preview in RHEL5.4:

2a8964d63d50dd2d65d71d342bc7fb6ef4117614
ext4: Clear the unwritten buffer_head flag after the extent is initialized

33b9817e2ae097c7b8d256e3510ac6c54fc6d9d0
ext4: Use a fake block number for delayed new buffer_head

2ec0ae3acec47f628179ee95fe2c4da01b5e9fc4
ext4: Fix race in ext4_inode_info.i_cached_extent

9c1ee184a30394e54165fa4c15923cabd952c106
ext4: Fix sub-block zeroing for writes into preallocated extents

These are in F11 as well, as of today.
Comment 1 RHEL Product and Program Management 2009-05-15 17:59:07 EDT
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.
Comment 2 Eric Sandeen 2009-05-18 12:02:43 EDT
Actually, I'm going to ask for blocker on this.  

There are already upstream patches for this issue, and I just merged them to F11.

There are a couple issues here, but one is trivial to reproduce; a partial-block write into a preallocated block will expose garbage:

[root@bear-05 test]# touch testfile
[root@bear-05 test]# /root/fallocate -l 4096 testfile
[root@bear-05 test]# dd if=/dev/zero of=testfile bs=1 count=1 conv=notrunc 
1+0 records in
1+0 records out
1 byte (1 B) copied, 5.1e-05 seconds, 19.6 kB/s
[root@bear-05 test]# hexdump -C testfile | more
00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000ba0  d0 be 95 0f 00 00 00 00  03 00 00 00 00 00 00 00  |................|
00000bb0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000c20  00 05 00 00 05 00 00 00  bf 00 00 00 3b 8a 00 00  |............;...|
00000c30  00 03 1c 7f 15 04 00 01  00 11 13 1a 00 12 0f 17  |................|
00000c40  16 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000c50  00 00 00 00 0f 00 00 00  0f 00 00 00 00 00 00 00  |................|
00000c60  00 00 00 00 00 00 00 00  70 d9 95 0f 00 00 00 00  |........p.......|
00000c70  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000cd0  30 e5 95 0f 00 00 00 00  80 63 95 0f 00 00 00 00  |0........c......|
00000ce0  01 00 00 00 00 00 00 00  33 89 11 4a 00 00 00 00  |........3..J....|
00000cf0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000d00  00 00 00 00 00 00 00 00  04 00 00 00 04 00 00 00  |................|
00000d10  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

This should be all zeros.

Thanks,
-Eric
Comment 5 Don Zickus 2009-05-21 11:37:11 EDT
in kernel-2.6.18-150.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.
Comment 10 Eric Sandeen 2009-08-12 11:38:51 EDT
The falloc.c you sent should work fine in "syscall" mode (sorry, I missed the NEEDINFO on this somehow)... (and sorry, I should have attached mine in the first place)

I'd suggest trying again with 4k blocks at mkfs time, rather than 1k (mkfs.ext4 -b 4096....)

-Eric
Comment 11 errata-xmlrpc 2009-09-02 04:45:09 EDT
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

Note You need to log in before you can comment on or make changes to this bug.