Blame SOURCES/e2fsprogs-1.42.9-enable-lazy_itable_init-on-newer-kernel-by-default.patch
|
|
72899d |
From 165af99c57a686444167fcef56f9fae31d815887 Mon Sep 17 00:00:00 2001
|
|
|
72899d |
From: Lukas Czerner <lczerner@redhat.com>
|
|
|
72899d |
Date: Mon, 24 Feb 2014 18:41:06 +0100
|
|
|
72899d |
Subject: [PATCH 4/8] mke2fs: Enable lazy_itable_init on newer kernel by
|
|
|
72899d |
default
|
|
|
72899d |
|
|
|
72899d |
Currently is used did not specified lazy_itable_init option we rely on
|
|
|
72899d |
information from ext4 module exported via sysfs interface. However if
|
|
|
72899d |
the ext4 module is not loaded it will not be enabled even though kernel
|
|
|
72899d |
might support it.
|
|
|
72899d |
|
|
|
72899d |
With this commit we set the default according to the kernel version,
|
|
|
72899d |
however we still allow it to be set manually via extended option or be
|
|
|
72899d |
enabled in case that ext4 module advertise that it supports this
|
|
|
72899d |
feature.
|
|
|
72899d |
|
|
|
72899d |
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
|
|
|
72899d |
---
|
|
|
72899d |
misc/mke2fs.c | 10 +++++++++-
|
|
|
72899d |
1 file changed, 9 insertions(+), 1 deletion(-)
|
|
|
72899d |
|
|
|
72899d |
diff --git a/misc/mke2fs.c b/misc/mke2fs.c
|
|
|
72899d |
index 76ea60b..23a988e 100644
|
|
|
72899d |
--- a/misc/mke2fs.c
|
|
|
72899d |
+++ b/misc/mke2fs.c
|
|
|
72899d |
@@ -1998,7 +1998,15 @@ profile_error:
|
|
|
72899d |
blocksize, sys_page_size);
|
|
|
72899d |
}
|
|
|
72899d |
|
|
|
72899d |
- lazy_itable_init = 0;
|
|
|
72899d |
+ /*
|
|
|
72899d |
+ * On newer kernels we do have lazy_itable_init support. So pick the
|
|
|
72899d |
+ * right default in case ext4 module is not loaded.
|
|
|
72899d |
+ */
|
|
|
72899d |
+ if (is_before_linux_ver(2, 6, 37))
|
|
|
72899d |
+ lazy_itable_init = 0;
|
|
|
72899d |
+ else
|
|
|
72899d |
+ lazy_itable_init = 1;
|
|
|
72899d |
+
|
|
|
72899d |
if (access("/sys/fs/ext4/features/lazy_itable_init", R_OK) == 0)
|
|
|
72899d |
lazy_itable_init = 1;
|
|
|
72899d |
|
|
|
72899d |
--
|
|
|
72899d |
1.8.3.1
|
|
|
72899d |
|