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

e2fsck can fail when encountering empty extended attribute blocks

Details

    • Bug
    • Resolution: Fixed
    • Major
    • None
    • Lustre 1.8.6
    • SLES 11SP1
    • 3
    • 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".

      Attachments

        Issue Links

          Activity

            [LU-752] e2fsck can fail when encountering empty extended attribute blocks

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

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

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

            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
            hudson Build Master (Inactive) added a comment - 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
            adilger Andreas Dilger made changes -
            Resolution New: Fixed [ 1 ]
            Status Original: Open [ 1 ] New: Resolved [ 5 ]

            Patch landed for e2fsprogs-1.41.90.wc4

            adilger Andreas Dilger added a comment - Patch landed for e2fsprogs-1.41.90.wc4
            niu Niu Yawei (Inactive) added a comment - http://review.whamcloud.com/1973
            adilger Andreas Dilger made changes -
            Assignee Original: Robert Read [ rread ] New: Niu Yawei [ niu ]

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

            adilger Andreas Dilger added a comment - Niu, can you please include this change into the e2fsprogs release you are working on.
            kenh Ken Hornstein created issue -

            People

              niu Niu Yawei (Inactive)
              kenh Ken Hornstein
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: