[LU-934] external xattr inode support in e2fsprogs Created: 16/Dec/11  Updated: 16/Jan/12  Resolved: 16/Jan/12

Status: Closed
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.2.0
Fix Version/s: Lustre 2.2.0

Type: Bug Priority: Minor
Reporter: Jian Yu Assignee: Jian Yu
Resolution: Fixed Votes: 0
Labels: None

Attachments: Text File external_inode.patch     Text File external_inode.patch    
Severity: 3
Rank (Obsolete): 6503

 Description   

The existing codes have the following issues:

  • pass1.c check_ea_in_inode() compares e_value_size to fit in free space of inode, but for xattr in external inode this is wrong.
  • e2fsck_lfsck_find_ea() have no code to copy EA from external inode.


 Comments   
Comment by Jian Yu [ 16/Dec/11 ]

Patch from Alexander Boyko is in the attachment.

While applying the patch on the latest e2fsprogs/master-lustre branch, I got:

patching file patches/e2fsprogs-large-ea.patch
patching file patches/e2fsprogs-lfsck.patch
patch: **** malformed patch at line 374:  

Alex, could you please fix the above issue and upload the updated patch to this ticket? I'd help submit the patch to Gerrit.

Comment by Alexander Boyko [ 16/Dec/11 ]
$ git pull
Already up-to-date.
$ git apply external_inode.patch -v
external_inode.patch:19: space before tab in indent.
 		if (entry->e_value_offs > storage_size ||
external_inode.patch:23: space before tab in indent.
 			problem = PR_1_INODE_EA_BAD_VALUE;
external_inode.patch:24: space before tab in indent.
 			goto fix;
external_inode.patch:25: space before tab in indent.
 		}
external_inode.patch:44: trailing whitespace.
@@ -1654,6 +1778,7 @@ static int check_ext_attr(e2fsck_t ctx, 
Checking patch patches/e2fsprogs-large-ea.patch...
Checking patch patches/e2fsprogs-lfsck.patch...
Applied patch patches/e2fsprogs-large-ea.patch cleanly.
Applied patch patches/e2fsprogs-lfsck.patch cleanly.
warning: squelched 36 whitespace errors
warning: 41 lines add whitespace errors.
git log
commit bc526c65d2a4cf0c6c04e9ed4837d6dd7dbbf2b3
Author: Theodore Ts'o <tytso@mit.edu>
Date:   Tue Jul 5 20:35:46 2011 -0400

    libext2fs: fix 64-bit support in ext2fs_bmap2()
    
    Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>

Are you use git apply?

Comment by Andreas Dilger [ 16/Dec/11 ]

The malformed patch is my fault. I was fixing the patch to use tabs instead of spaces for indenting. It should be easy enough to edit the patch to correct the line count for the malformed hunk.

Comment by Alexander Boyko [ 16/Dec/11 ]

change spaces to tabs

Comment by Jian Yu [ 18/Dec/11 ]

The patch is in: http://review.whamcloud.com/1886

$ git apply external_inode.patch -v
external_inode.patch:19: space before tab in indent.
 		if (entry->e_value_offs > storage_size ||
external_inode.patch:23: space before tab in indent.
 			problem = PR_1_INODE_EA_BAD_VALUE;
external_inode.patch:24: space before tab in indent.
 			goto fix;
external_inode.patch:25: space before tab in indent.
 		}
external_inode.patch:44: trailing whitespace.
@@ -1654,6 +1778,7 @@ static int check_ext_attr(e2fsck_t ctx, 
Checking patch patches/e2fsprogs-large-ea.patch...
Checking patch patches/e2fsprogs-lfsck.patch...
Applied patch patches/e2fsprogs-large-ea.patch cleanly.
Applied patch patches/e2fsprogs-lfsck.patch cleanly.
warning: squelched 38 whitespace errors
warning: 43 lines add whitespace errors.
Comment by Build Master (Inactive) [ 16/Jan/12 ]

Integrated in e2fsprogs-master » x86_64,el5 #159
LU-934 e2fsck: copy EA from external inode, fix size check (Revision f8ba0de1d5d4fb670c3bb287e6d20d1ded8827dd)

Result = SUCCESS
alexander_boyko : f8ba0de1d5d4fb670c3bb287e6d20d1ded8827dd
Files :

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

Integrated in e2fsprogs-master » x86_64,el6 #159
LU-934 e2fsck: copy EA from external inode, fix size check (Revision f8ba0de1d5d4fb670c3bb287e6d20d1ded8827dd)

Result = SUCCESS
alexander_boyko : f8ba0de1d5d4fb670c3bb287e6d20d1ded8827dd
Files :

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

Integrated in e2fsprogs-master » i686,el6 #159
LU-934 e2fsck: copy EA from external inode, fix size check (Revision f8ba0de1d5d4fb670c3bb287e6d20d1ded8827dd)

Result = SUCCESS
alexander_boyko : f8ba0de1d5d4fb670c3bb287e6d20d1ded8827dd
Files :

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

Integrated in e2fsprogs-master » i686,el5 #159
LU-934 e2fsck: copy EA from external inode, fix size check (Revision f8ba0de1d5d4fb670c3bb287e6d20d1ded8827dd)

Result = SUCCESS
alexander_boyko : f8ba0de1d5d4fb670c3bb287e6d20d1ded8827dd
Files :

  • patches/e2fsprogs-lfsck.patch
  • patches/e2fsprogs-large-ea.patch
Comment by Jian Yu [ 16/Jan/12 ]

The patch has been pushed to e2fsprogs/master-lustre branch. The issue is resolved.

Generated at Sat Feb 10 01:11:51 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.