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

Implement ldiskfs LARGEDIR support for e2fsprogs

Details

    • 3
    • 10210

    Description

      This INCOMPAT_LARGEDIR feature allows larger directories to be created in ldiskfs, both with directory sizes over 2GB and and a maximum htree depth of 3 instead of the current limit of 2. These features are needed in order to exceed the current limit of approximately 10M entries in a single directory. The INCOMPAT_LARGEDIR feature was added to ldiskfs as part of the pdirops LU-50 coding, but was not part of that project. As there is currently no mke2fs, e2fsck, or tune2fs support for INCOMPAT_LARGEDIR, this feature is disabled by default when creating a new ldiskfs filesystem as it would otherwise make the filesystem unrecoverable in the case that e2fsck needs to be run on it.

      Tasks that need to be completed before INCOMPAT_LARGEDIR can be used:

      • add support for the INCOMPAT_LARGEDIR and "large_dir" features to mke2fs/tune2fs
      • add conf-sanity.sh test LARGEDIR and 3-level htree for local ldiskfs with 1kB blocksize up to 100k entries with 255-byte names (3-level exceeded at 48k entries). This might be done using a smaller number of hard-linked inodes (nlink_max = 65000), to avoid overhead of accessing and caching a large number of different inodes.
      • add parallel-scale.sh test LARGEDIR and >2GB directories with Lustre using 255-byte names and 10M entries (2GB exceeded at 4M entries, 4GB exceeded at 8M entries). This might be done using a smaller number of hard-linked inodes (nlink_max = 65000), to avoid overhead of accessing and caching a large number of different inodes.
      • e2fsck support for 3-level htree
      • e2fsck support for directories larger than 2GB (using i_size_hi consistently for S_IFDIR() inodes)
      • e2fsprogs regression test test for 3-level/2GB+ htree e2fsck, corruptions
      • e2fsprogs add LARGEDIR feature to "tests/f_random_corruption"
      • port the ext4-large-dir.patch with the INCOMPAT_LARGEDIR features (>2GB, 3-level htree) to the upstream kernel and submit to linux-ext4 list for review
      • submit e2fsprogs patches to linux-ext4 list for review
      • solicit testing of feature from community
      • some time after e2fsprogs is released and available for download, a patch is needed to enable large_dir on new filesystems with mkfs.lustre
      • updates to the user manual and release notes to describe how to enable the large_dir feature with tune2fs

      Attachments

        1. conf-san-125-4.txt.tar.gzip
          22 kB
        2. conf-sanity-124-125.tar.bz2
          16 kB
        3. image.png
          image.png
          64 kB
        4. image-2.png
          image-2.png
          11 kB

        Issue Links

          Activity

            [LU-1365] Implement ldiskfs LARGEDIR support for e2fsprogs

            Andreas Dilger (adilger@whamcloud.com) merged in patch https://review.whamcloud.com/33814/
            Subject: LU-1365 debugfs: output large directory size
            Project: tools/e2fsprogs
            Branch: master-lustre
            Current Patch Set:
            Commit: b3267b9f4f9037b84fa83e1296e7dad508a592ba

            gerrit Gerrit Updater added a comment - Andreas Dilger (adilger@whamcloud.com) merged in patch https://review.whamcloud.com/33814/ Subject: LU-1365 debugfs: output large directory size Project: tools/e2fsprogs Branch: master-lustre Current Patch Set: Commit: b3267b9f4f9037b84fa83e1296e7dad508a592ba

            Artem Blagodarenko (c17828@cray.com) uploaded a new patch: https://review.whamcloud.com/33814
            Subject: LU-1365 debugfs: output large directory size
            Project: tools/e2fsprogs
            Branch: master-lustre
            Current Patch Set: 1
            Commit: d598fae184f1abdfd47b8396f21db217238ce220

            gerrit Gerrit Updater added a comment - Artem Blagodarenko (c17828@cray.com) uploaded a new patch: https://review.whamcloud.com/33814 Subject: LU-1365 debugfs: output large directory size Project: tools/e2fsprogs Branch: master-lustre Current Patch Set: 1 Commit: d598fae184f1abdfd47b8396f21db217238ce220

            Artem Blagodarenko (c17828@cray.com) uploaded a new patch: https://review.whamcloud.com/33813
            Subject: LU-1365 e2fsck: allow to check >2GB sized directory
            Project: tools/e2fsprogs
            Branch: master-lustre
            Current Patch Set: 1
            Commit: 7e77372d97aad810b651e680220d8168cd5bf54c

            gerrit Gerrit Updater added a comment - Artem Blagodarenko (c17828@cray.com) uploaded a new patch: https://review.whamcloud.com/33813 Subject: LU-1365 e2fsck: allow to check >2GB sized directory Project: tools/e2fsprogs Branch: master-lustre Current Patch Set: 1 Commit: 7e77372d97aad810b651e680220d8168cd5bf54c

            Artem Blagodarenko (c17828@cray.com) uploaded a new patch: https://review.whamcloud.com/33757
            Subject: LU-1365 utils: allow set block size for ldiskfs backend
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 1fc5bde1a96d249febd15e5c96e33d1b4c9b64ce

            gerrit Gerrit Updater added a comment - Artem Blagodarenko (c17828@cray.com) uploaded a new patch: https://review.whamcloud.com/33757 Subject: LU-1365 utils: allow set block size for ldiskfs backend Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 1fc5bde1a96d249febd15e5c96e33d1b4c9b64ce

            Artem Blagodarenko (c17828@cray.com) uploaded a new patch: https://review.whamcloud.com/33756
            Subject: LU-1365 tests: createmany outputs stat after 2 seconds
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: b66dd7a12ca6ef3290e09d2baabe2361c758f2e3

            gerrit Gerrit Updater added a comment - Artem Blagodarenko (c17828@cray.com) uploaded a new patch: https://review.whamcloud.com/33756 Subject: LU-1365 tests: createmany outputs stat after 2 seconds Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: b66dd7a12ca6ef3290e09d2baabe2361c758f2e3
            dongyang Dongyang Li added a comment -

            Artem, Looks like in process_block() from pass1, the limit of dir size is still 2GB.

            with large_dir we could end up with a dir larger than 2GB, like the one created in conf_sanity test_125.

            I also noticed that stat and ls from debugfs is showing the size of the dir as a negative value for the same dir,

            the reason is we are just using inode->i_size rather than EXT2_I_SIZE(inode).

            Can you please fix them in e2fsprogs upstream? Also please push a patch to gerrit for the master-lustre branch so we can land it from our side.

            Thanks

            DY

            dongyang Dongyang Li added a comment - Artem, Looks like in process_block() from pass1, the limit of dir size is still 2GB. with large_dir we could end up with a dir larger than 2GB, like the one created in conf_sanity test_125. I also noticed that stat and ls from debugfs is showing the size of the dir as a negative value for the same dir, the reason is we are just using inode->i_size rather than EXT2_I_SIZE(inode). Can you please fix them in e2fsprogs upstream? Also please push a patch to gerrit for the master-lustre branch so we can land it from our side. Thanks DY

            Reopen this issue while the patch is still unlanded.

            There also appears to be an issue with e2fsck and directories over 2GB:

            Pass 1: Checking inodes, blocks, and sizes
            Inode 252 is too big.  Truncate? no
            
            Block #524289 (552395) causes directory to be too big.  IGNORED.
            Block #524290 (552396) causes directory to be too big.  IGNORED.
            Block #524291 (552397) causes directory to be too big.  IGNORED.
            Block #524292 (552398) causes directory to be too big.  IGNORED.
            Block #524293 (552399) causes directory to be too big.  IGNORED.
            
            adilger Andreas Dilger added a comment - Reopen this issue while the patch is still unlanded. There also appears to be an issue with e2fsck and directories over 2GB: Pass 1: Checking inodes, blocks, and sizes Inode 252 is too big. Truncate? no Block #524289 (552395) causes directory to be too big. IGNORED. Block #524290 (552396) causes directory to be too big. IGNORED. Block #524291 (552397) causes directory to be too big. IGNORED. Block #524292 (552398) causes directory to be too big. IGNORED. Block #524293 (552399) causes directory to be too big. IGNORED.

            adilger, I have attached logs for conf_sanity_124 and conf_sanity_125 just. Test session in my local environment. They are passed. I also  installed packages that maloo built, and test started successfully (I haven't wait until it finished, but they are not failed in start like in maloo).

            I have no idea how to fix maloo test session. Do you have any suggestions?

            artem_blagodarenko Artem Blagodarenko (Inactive) added a comment - - edited adilger , I have attached logs for conf_sanity_124 and conf_sanity_125 just. Test session in my local environment. They are passed. I also  installed packages that maloo built, and test started successfully (I haven't wait until it finished, but they are not failed in start like in maloo). I have no idea how to fix maloo test session. Do you have any suggestions?

            Wang Shilong (wshilong@ddn.com) uploaded a new patch: https://review.whamcloud.com/30913
            Subject: LU-1365 tests: 3 level hash tree test
            Project: tools/e2fsprogs
            Branch: master-lustre
            Current Patch Set: 1
            Commit: ad3eabbbbb5305cc1006db9ec11a66cba795a228

            gerrit Gerrit Updater added a comment - Wang Shilong (wshilong@ddn.com) uploaded a new patch: https://review.whamcloud.com/30913 Subject: LU-1365 tests: 3 level hash tree test Project: tools/e2fsprogs Branch: master-lustre Current Patch Set: 1 Commit: ad3eabbbbb5305cc1006db9ec11a66cba795a228

            Wang Shilong (wshilong@ddn.com) uploaded a new patch: https://review.whamcloud.com/30912
            Subject: LU-1365 e2fsprogs: add support for 3-level htree
            Project: tools/e2fsprogs
            Branch: master-lustre
            Current Patch Set: 1
            Commit: 1140574de77dad5aeca7b3688aa866d6921c97a3

            gerrit Gerrit Updater added a comment - Wang Shilong (wshilong@ddn.com) uploaded a new patch: https://review.whamcloud.com/30912 Subject: LU-1365 e2fsprogs: add support for 3-level htree Project: tools/e2fsprogs Branch: master-lustre Current Patch Set: 1 Commit: 1140574de77dad5aeca7b3688aa866d6921c97a3

            This landed to upstream e2fsprogs-1.44, and kernel 4.14.

            adilger Andreas Dilger added a comment - This landed to upstream e2fsprogs-1.44, and kernel 4.14.

            People

              artem_blagodarenko Artem Blagodarenko (Inactive)
              adilger Andreas Dilger
              Votes:
              0 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: