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

change e2fsprogs to make it allow directories over 2GB

Details

    • Improvement
    • Resolution: Duplicate
    • Major
    • None
    • Lustre 2.2.0
    • 10086

    Description

      Parallel Directory Operation patch (LU-50, http://review.whamcloud.com/#change,375) will support 3-level directory which requires directory size over 2G, besides code change for htree of ext4/ldiskfs, we also need to use i_size_high to store size of directory. This requires change to e2fsprogs to make it understand it.
      We've added feature EXT4_FEATURE_RO_COMPAT_LARGEDIR to ldiskfs to prevent kernel/e2fsprogs that only support 2-level to modify 3-level directories, this should also be added to e2fsprogs.

      Attachments

        Issue Links

          Activity

            [LU-896] change e2fsprogs to make it allow directories over 2GB

            The kernel patch checks for INCOMPAT_LARGEDIR before using directories over 2GB or with more than 2-level htree. This means the 2.2 ldiskfs is safe to use even without this patch in e2fsprogs, because nothing should be able to set INCOMPAT_LARGEDIR until e2fsprogs is updated. This will also give us compatibility with 2.3 if the LARGEDIR feature can be enabled with newer e2fsprogs, but Lustre needs to be downgraded for some reason.

            adilger Andreas Dilger added a comment - The kernel patch checks for INCOMPAT_LARGEDIR before using directories over 2GB or with more than 2-level htree. This means the 2.2 ldiskfs is safe to use even without this patch in e2fsprogs, because nothing should be able to set INCOMPAT_LARGEDIR until e2fsprogs is updated. This will also give us compatibility with 2.3 if the LARGEDIR feature can be enabled with newer e2fsprogs, but Lustre needs to be downgraded for some reason.

            I was thinking about this further. It seems that this needs to be an INCOMPAT feature. The reason is that the old code used only frame->at[2] to do tree traversal. This prevents the old code from even trying to access a 3-level tree I think, so RO_COMPAT is not enough in this case

            That said I guess that this feature as described is only for 2GB directories, but I don't know if that is useful without 3-level htree, so I'm not sure if it is worthwhile to have two separate features?

            adilger Andreas Dilger added a comment - I was thinking about this further. It seems that this needs to be an INCOMPAT feature. The reason is that the old code used only frame->at [2] to do tree traversal. This prevents the old code from even trying to access a 3-level tree I think, so RO_COMPAT is not enough in this case That said I guess that this feature as described is only for 2GB directories, but I don't know if that is useful without 3-level htree, so I'm not sure if it is worthwhile to have two separate features?

            People

              wc-triage WC Triage
              liang Liang Zhen (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: