From 210fd2c7072f2f150e2bb10b07c49472bb78e366 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Fri, 1 Oct 2010 10:47:38 -0400 Subject: [PATCH] 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" --- misc/mke2fs.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/misc/mke2fs.c b/misc/mke2fs.c index 08fab41..3c10a7a 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++) { -- 1.8.3.1