From: Li Dongyang Date: Wed, 23 Oct 2019 00:10:34 +0000 (+1100) Subject: LU-11546 utils: enable large_dir for ldiskfs X-Git-Tag: 2.12.8~21 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=638638e3481f6dd3f6830e8e272362d8922c52f7;p=fs%2Flustre-release.git LU-11546 utils: enable large_dir for ldiskfs Format MDT with "large_dir" option by default, to get over the 10M-entry limit for the directories. Lustre-change: https://review.whamcloud.com/36555 Lustre-commit: cd1faa0124f21e12a5ecd83c709c13918264fc86 Signed-off-by: Li Dongyang Change-Id: Ie51e6ce28b5f00adc9958de24794a760d9b43b77 Reviewed-by: Andreas Dilger Reviewed-by: Artem Blagodarenko Reviewed-by: Stephan Thiell Signed-off-by: Minh Diep Reviewed-on: https://review.whamcloud.com/36781 Tested-by: jenkins Reviewed-by: Artem Blagodarenko Tested-by: Maloo --- diff --git a/lustre/utils/libmount_utils_ldiskfs.c b/lustre/utils/libmount_utils_ldiskfs.c index 2a3088b..5dd0d3a 100644 --- a/lustre/utils/libmount_utils_ldiskfs.c +++ b/lustre/utils/libmount_utils_ldiskfs.c @@ -599,6 +599,10 @@ static int enable_default_ext4_features(struct mkfs_opts *mop, char *anchor, if (enable_64bit) append_unique(anchor, ",", "64bit", NULL, maxbuflen); + /* Allow more than 10M directory entries */ + if (is_e2fsprogs_feature_supp("-O large_dir") == 0) + 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. */