Bug 1112242

Summary: e2fsck can not fix corrupted directory entry
Product: Red Hat Enterprise Linux 6 Reporter: Monakhov Dmitriy <dmonakhov>
Component: e2fsprogsAssignee: Eric Sandeen <esandeen>
Status: CLOSED ERRATA QA Contact: dhe
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.7CC: bkb, eguan, kolyshkin, sct
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: e2fsprogs-1.41.12-21.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-14 07:54:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Corrupted image none

Description Monakhov Dmitriy 2014-06-23 11:55:54 UTC
Created attachment 911406 [details]
Corrupted image

One of filesystems was corrupted by accident (bad raid hw, not related with current issue). As result some directory block was zeroed. And fs complains about that like follows:

[4155514.187167] EXT4-fs error (device ploop28175p1): ext4_add_entry: bad entry in directory #917395: rec_len is smaller than minimal - block=3680938offset=0(0), inode=0, rec_len=0, name_len=0
[4155514.494852] EXT4-fs error (device ploop28175p1): ext4_add_entry: bad entry in directory #917395: rec_len is smaller than minimal - block=3680938offset=0(0), inode=0, rec_len=0, name_len=0

* WHAT IS WRONG:
This is obvious corruption which should be reported and fixed by e2fsck. But e2fsck oversee that error. 
* PROPOSED FIX
This is known issue which was fixed by following commmit a4fdf09414e04e9ecb995aa0af2f525d335987ae                                                   
From: Theodore Ts'o <tytso>                                                                                      
Date: Wed, 22 Dec 2010 13:53:02 -0500                                                                                    
libext2fs: Don't use the extended rec_len encoding for standard file systems

Please backport this commit to e2fsprogs package

*Original image description (orig fs size:25Gb):
**Raw e2image generated with following cmd: 
   e2image -r /dev/ploop22852p1 - | bzip2 > ploop22852p1.e2i.bz2

** Unpack and check how-to
   # pbunzip2 -c ploop22852p1.e2i.bz2 | cp --sparse=always /dev/stdin ploop22852p1.img
   # e2fsck -f ploop22852p1.img
**List of corrupted dentries:
#917395 68-69 blocks are zeroed
#928616 13'th block is corrupted

Comment 1 Monakhov Dmitriy 2014-06-23 11:56:51 UTC
All checks was performed on e2fsprogs-1.41.12-18.el6.x86_64

Comment 3 Eric Sandeen 2014-06-23 15:37:35 UTC
Thanks Dmitriy.

Comment 6 Kirill Kolyshkin 2014-08-30 05:25:01 UTC
Any update on this? We have seen a similar corruption which current e2fsck can't see.

Comment 7 Eric Sandeen 2014-09-02 14:13:01 UTC
The fix will be released in RHEL6.6.

Comment 8 errata-xmlrpc 2014-10-14 07:54:22 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-1566.html