Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-934

external xattr inode support in e2fsprogs

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.2.0
    • Lustre 2.2.0
    • None
    • 3
    • 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.

      Attachments

        1. external_inode.patch
          12 kB
          Alexander Boyko
        2. external_inode.patch
          12 kB
          Jian Yu

        Issue Links

          Activity

            [LU-934] external xattr inode support in e2fsprogs
            yujian Jian Yu added a comment -

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

            yujian Jian Yu added a comment - The patch has been pushed to e2fsprogs/master-lustre branch. The issue is resolved.

            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
            hudson Build Master (Inactive) added a comment - 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

            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
            hudson Build Master (Inactive) added a comment - 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

            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
            hudson Build Master (Inactive) added a comment - 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

            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
            hudson Build Master (Inactive) added a comment - 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
            yujian Jian Yu added a comment -

            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.
            
            yujian Jian Yu added a comment - 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.

            change spaces to tabs

            aboyko Alexander Boyko added a comment - change spaces to tabs

            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.

            adilger Andreas Dilger added a comment - 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.
            $ 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?

            aboyko Alexander Boyko added a comment - $ 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?
            yujian Jian Yu added a comment - - edited

            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.

            yujian Jian Yu added a comment - - edited 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.

            People

              yujian Jian Yu
              yujian Jian Yu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: