[Nexus 7 Android Development] jubei_mitsuyoshi:
Background..

With any linux system i build first thing i do is remove the journal from all my EXT4 partitions, to make a long story short ( i wont bore you with details of just how journal writes totally slow disk i/o , google it ) this gave me on average a 25% increase in system speed ( obviously due to the increased i/o rate )

I usually did it with

mke2fs.ext4 -O ^has_journal ...device...

before installing the distro, now i thought hey maybe this would work on android?

Now mke2fs is not well supported on arm but tune2fs is! in fact its included in TWRP 2.5 so

tune2fs -O ^has_journal /dev/block/platform/sdhci-tegra.3/by-name/APP

( for the system partition) should work right , and in fact yes it does !!!, tried it from TWRP command line and hey presto %^$%^$^%$ FAST system

This is the code for a recovery script version

ui_print("test script");
ui_print("");
ui_print("");
ifelse(is_mounted("/system") == "/system", unmount("/system"));
ifelse(is_mounted("/cache") == "/cache", unmount("/cache"));
ifelse(is_mounted("/data") == "/data", unmount("/data"));
ui_print("converting partitions to ext4 minus journal");
ui_print(" ");
set_progress(1.000000);
ui_print("e2fsck system partition");
ui_print(" ");
run_program("/sbin/e2fsck", "-p", "/dev/block/platform/sdhci-tegra.3/by-name/APP");
ui_print("e2fsck data partition");
ui_print(" ");
run_program("/sbin/e2fsck", "-p", "/dev/block/platform/sdhci-tegra.3/by-name/UDA");
ui_print("e2fsck cache partition");
ui_print(" ");
run_program("/sbin/e2fsck", "-p", "/dev/block/platform/sdhci-tegra.3/by-name/CAC");
ui_print("now lets rub out those nasty journals");
ui_print(" ");
run_program("/sbin/tune2fs", "-O", "^has_journal", "/dev/block/platform/sdhci-tegra.3/by-name/APP");
run_program("/sbin/tune2fs", "-O", "^has_journal", "/dev/block/platform/sdhci-tegra.3/by-name/UDA");
run_program("/sbin/tune2fs", "-O", "^has_journal", "/dev/block/platform/sdhci-tegra.3/by-name/CAC");
ui_print("and re-fsck to clean any set bits");
ui_print(" ");
ui_print("e2fsck system partition");
ui_print(" ");
run_program("/sbin/e2fsck", "-p", "/dev/block/platform/sdhci-tegra.3/by-name/APP");
ui_print("e2fsck data partition");
ui_print(" ");
run_program("/sbin/e2fsck", "-p", "/dev/block/platform/sdhci-tegra.3/by-name/UDA");
ui_print("e2fsck cache partition");
ui_print(" ");
run_program("/sbin/e2fsck", "-p", "/dev/block/platform/sdhci-tegra.3/by-name/CAC");

And i include a zip for those who like to test

Ps have not checked the function of this line

run_program("/sbin/tune2fs", "-O", "^has_journal", "/dev/block/platform/sdhci-tegra.3/by-name/APP");

the bash equivalent is

tune2fs -O ^has_journal /dev/block/platform/sdhci-tegra.3/by-name/APP

where ^has_journal is a parameter of -O not sure the recovery script is wrapping that correctly, if anyone flashes this script could you please check by typing

tune2fs -l /dev/block/platform/sdhci-tegra.3/by-name/APP

in the TWRP terminal, scroll upward with an up finger swipe and check has_journal is not in the filesystem properties ( going to do it myself on next system wipe, but just enjoying the speed at the mo !! , am testing it on PRIME 04-20 mildly tweaked by me )

Thanks

Edit ... Since there has been more than passing interest in this obscure piece of code i have decided to tidy this post up

Hence now there are 2 scripts, one to remove the journal from your ext4 partitions, and one to re-instate the journal, this should allow people to test their setup with each without any wiping or reformatting

Instructions.......

( tested with TWRP 2.5+ only )

Flash the bugger :)

DO NOT WIPE ANYTHING, after flashing, doing so will only reformat the wiped partition with a journal