Whamcloud - gitweb
LU-11923 utils: fix mkfs.lustre meta_bg handling 78/34178/2
authorAndreas Dilger <adilger@whamcloud.com>
Tue, 5 Feb 2019 10:06:43 +0000 (03:06 -0700)
committerOleg Drokin <green@whamcloud.com>
Wed, 27 Feb 2019 02:02:40 +0000 (02:02 +0000)
commitb34dfa699e1e79626363affd26999453252eac7a
tree60b99b1be3d209c69076fab82d09b262e9b6f223
parentca91c215b00e405b9dad5b3fd3664bc131e168c9
LU-11923 utils: fix mkfs.lustre meta_bg handling

If meta_bg is specified as a formatting option, mke2fs reports an
error because it conflicts with the default resize_inode feature,
which is enabled by default for filesystems under 2^32 blocks.

Enable meta_bg by default if the filesystem is over 2^36 blocks
(256TiB) or the group descriptor table grows too large.

Disable the resize_inode feature if meta_bg is explicitly specified
or if the filesystem is over 2^32 blocks.

Fix is_e2fsprogs_feature_supp() to return a boolean in the proper
sense for the function, rather than a 0 or -ve error number, since
that doesn't make sense for the name of the function.

Drop a level of indent in ldiskfs_make_lustre() by returning an
error directly if the ldd_mount_type is unknown.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I8886e6850aad5868155b2208043dbbc4873ebbe5
Reviewed-on: https://review.whamcloud.com/34178
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/utils/libmount_utils_ldiskfs.c