Whamcloud - gitweb
LU-11546 utils: enable large_dir for ldiskfs 55/36555/2
authorLi Dongyang <dongyangli@ddn.com>
Wed, 23 Oct 2019 00:10:34 +0000 (11:10 +1100)
committerOleg Drokin <green@whamcloud.com>
Tue, 12 Nov 2019 04:06:48 +0000 (04:06 +0000)
Format MDT with "large_dir" option by default,
to get over the 10M-entry limit for the directories.

Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Change-Id: Ie51e6ce28b5f00adc9958de24794a760d9b43b77
Reviewed-on: https://review.whamcloud.com/36555
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Artem Blagodarenko <c17828@cray.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Stephan Thiell <sthiell@stanford.edu>
lustre/utils/libmount_utils_ldiskfs.c

index 60179b6..56dd609 100644 (file)
@@ -611,6 +611,10 @@ static int enable_default_ext4_features(struct mkfs_opts *mop, char *anchor,
        if (IS_MDT(&mop->mo_ldd) && is_e2fsprogs_feature_supp("-O ea_inode"))
                append_unique(anchor, ",", "ea_inode", NULL, maxbuflen);
 
        if (IS_MDT(&mop->mo_ldd) && is_e2fsprogs_feature_supp("-O ea_inode"))
                append_unique(anchor, ",", "ea_inode", NULL, maxbuflen);
 
+       /* Allow more than 10M directory entries */
+       if (IS_MDT(&mop->mo_ldd) && is_e2fsprogs_feature_supp("-O large_dir"))
+               append_unique(anchor, ",", "large_dir", NULL, maxbuflen);
+
        /* Cluster inode/block bitmaps and inode table for more efficient IO.
         * Align the flex groups on a 1MB boundary for better performance. */
        /* This -O feature needs to go last, since it adds the "-G" option. */
        /* Cluster inode/block bitmaps and inode table for more efficient IO.
         * Align the flex groups on a 1MB boundary for better performance. */
        /* This -O feature needs to go last, since it adds the "-G" option. */