[LU-752] e2fsck can fail when encountering empty extended attribute blocks Created: 11/Oct/11  Updated: 17/Jan/12  Resolved: 17/Jan/12

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 1.8.6
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Ken Hornstein Assignee: Niu Yawei (Inactive)
Resolution: Fixed Votes: 0
Labels: e2fsprogs
Environment:

SLES 11SP1


Attachments: Text File e2fsck.patch    
Severity: 3
Epic: e2fsprogs
Rank (Obsolete): 6545

 Description   

When using e2fsck to create databases for later usage by lfsck, we ran into a problem where e2fsck would fail; the error was "error: only handle v1/v3 LOV EAs, not 00000001".

After some research, what I found was that as part of pass 1 of e2fsck, e2fsck would call the function e2fsck_lfsck_find_ea(), and that it would occasionally pass down in a blank EA block (I guess it is iterating through all of the EA blocks). For these blank EA blocks the name length (e_name_len) is set to 0. But e2fsck_lfsck_find_ea() calls strncmp() to match the EA name against the values that Lustre uses, and since the length passed into strncmp() is 0, the strncmp always succeeds. But since this isn't a Lustre EA block lfsck_check_lov_ea() fails on it (with the above error).

Attached is a simple change that will check to see if e_name_len is 0 and return from e2fsck_lfsck_find_ea(); this solved our problem. It also occurs to me that for the sake of completeness e_name_len should be checked against the actual lengths of the EA data that Lustre uses; otherwise e2fsck could get confused if someone creates a EA attribute named "lo" or even just "l".



 Comments   
Comment by Andreas Dilger [ 26/Oct/11 ]

Niu, can you please include this change into the e2fsprogs release you are working on.

Comment by Niu Yawei (Inactive) [ 16/Jan/12 ]

http://review.whamcloud.com/1973

Comment by Andreas Dilger [ 17/Jan/12 ]

Patch landed for e2fsprogs-1.41.90.wc4

Comment by Build Master (Inactive) [ 17/Jan/12 ]

Integrated in e2fsprogs-master » x86_64,el5 #163
LU-752 lfsck: compare EA name correctly (Revision 5aed93c3e04548d305909600a885643a0f0b07b6)

Result = SUCCESS
Niu Yawei : 5aed93c3e04548d305909600a885643a0f0b07b6
Files :

  • patches/e2fsprogs-lfsck.patch
Comment by Build Master (Inactive) [ 17/Jan/12 ]

Integrated in e2fsprogs-master » x86_64,el6 #163
LU-752 lfsck: compare EA name correctly (Revision 5aed93c3e04548d305909600a885643a0f0b07b6)

Result = SUCCESS
Niu Yawei : 5aed93c3e04548d305909600a885643a0f0b07b6
Files :

  • patches/e2fsprogs-lfsck.patch
Comment by Build Master (Inactive) [ 17/Jan/12 ]

Integrated in e2fsprogs-master » i686,el6 #163
LU-752 lfsck: compare EA name correctly (Revision 5aed93c3e04548d305909600a885643a0f0b07b6)

Result = SUCCESS
Niu Yawei : 5aed93c3e04548d305909600a885643a0f0b07b6
Files :

  • patches/e2fsprogs-lfsck.patch
Comment by Build Master (Inactive) [ 17/Jan/12 ]

Integrated in e2fsprogs-master » i686,el5 #163
LU-752 lfsck: compare EA name correctly (Revision 5aed93c3e04548d305909600a885643a0f0b07b6)

Result = SUCCESS
Niu Yawei : 5aed93c3e04548d305909600a885643a0f0b07b6
Files :

  • patches/e2fsprogs-lfsck.patch
Generated at Sat Feb 10 01:10:05 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.