Currently none of valuable ext4 features are used when ext4 image
generation is selected, most notably the journaling function is missing.

This patch enables the journaling feature and optimizes the directories
in the created filesystem afterwards.

Signed-off-by: Michael Heimpold <m...@heimpold.de>
---
 include/image.mk |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/image.mk b/include/image.mk
index 1977fc8..d3cd5f1 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -126,9 +126,9 @@ ifneq ($(CONFIG_TARGET_ROOTFS_EXT4FS),)
 # generate an ext2 fs
        $(STAGING_DIR_HOST)/bin/genext2fs -U -b $(E2SIZE) -N 
$(CONFIG_TARGET_ROOTFS_MAXINODE) -d $(TARGET_DIR)/ $(KDIR)/root.ext4
 # convert it to ext4
-       $(STAGING_DIR_HOST)/bin/tune2fs -O extents,uninit_bg,dir_index 
$(KDIR)/root.ext4
+       $(STAGING_DIR_HOST)/bin/tune2fs -o journal_data -O 
extents,uninit_bg,dir_index,has_journal $(KDIR)/root.ext4
 # fix it up
-       $(STAGING_DIR_HOST)/bin/e2fsck -fy $(KDIR)/root.ext4
+       $(STAGING_DIR_HOST)/bin/e2fsck -fyD $(KDIR)/root.ext4
        $(call Image/Build,ext4)
   endef
 endif
-- 
1.7.9.5

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to