From: Theodore Ts'o Date: Fri, 1 Oct 2010 14:47:38 +0000 (-0400) Subject: mke2fs: Enable lazy_itable_init if the kernel supports this feature X-Git-Tag: v1.41.13~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=210fd2c7072f2f150e2bb10b07c49472bb78e366;p=thirdparty%2Fe2fsprogs.git mke2fs: Enable lazy_itable_init if the kernel supports this feature Add check for /sys/fs/ext4/features/lazy_itable_init. If this file exists, it should be OK to skip initializing the inode table since the kernel will do it at mount time. Signed-off-by: "Theodore Ts'o" --- diff --git a/misc/mke2fs.c b/misc/mke2fs.c index 08fab41bf..3c10a7a7a 100644 --- a/misc/mke2fs.c +++ b/misc/mke2fs.c @@ -1723,8 +1723,13 @@ got_size: blocksize = EXT2_BLOCK_SIZE(&fs_param); + lazy_itable_init = 0; + if (access("/sys/fs/ext4/features/lazy_itable_init", R_OK) == 0) + lazy_itable_init = 1; + lazy_itable_init = get_bool_from_profile(fs_types, - "lazy_itable_init", 0); + "lazy_itable_init", + lazy_itable_init); /* Get options from profile */ for (cpp = fs_types; *cpp; cpp++) {