what IS journaling?

traumahawk

Well-known member
Jan 12, 2011
303
19
0
noob question- what is this "journaling" that i see people talking about. all i know is its disabled in SRF and not in other roms i've tried (and apparently it can cause my data to be screwed up. comforting).
 
noob question- what is this "journaling" that i see people talking about. all i know is its disabled in SRF and not in other roms i've tried (and apparently it can cause my data to be screwed up. comforting).

Journaling file system - Wikipedia, the free encyclopedia

Thats about the best explanation I can come up with for you.

Besides what it mentions there, it does make your device run a bit snappier and its been in use since a few weeks after DK28 Froyo was leaked and EXT4 came into play.
 
  • Like
Reactions: traumahawk
I would think of journaling as this: it makes sure that if files are modified (a setting is changed, new incoming data, etc.), if the process gets interrupted while the file is being modified (like if battery is pulled or phone is hard-rebooted), the file doesn't get corrupted. It does this basically by keeping the file in a cache until the change is finalized. Having journaling enabled makes the device a tiny bit less responsive (because it has to manage this cache) but safeguards against corruption in case the phone reboots unexpectedly.

If you play video games, think of how it always says "If you see this symbol, do not power off your machine until it goes away, or your save file could be corrupt."
 
Does anyone think journaling is that big of a deal? It doesn't seem like it to me, or am I missing something?

Sent from my Epic using Tapatalk
 
If you play video games, think of how it always says "If you see this symbol, do not power off your machine until it goes away, or your save file could be corrupt."

beautiful explanation. so basically just dont turn it off suddenly and there shouldnt be any problems.

and this corruption.. only on the data at that moment right? (ie- if i were to suddenly shut down, and restore a nandroid, corruption would be gone (akin to just using an older gamesave?)
 
beautiful explanation. so basically just dont turn it off suddenly and there shouldnt be any problems.

and this corruption.. only on the data at that moment right? (ie- if i were to suddenly shut down, and restore a nandroid, corruption would be gone (akin to just using an older gamesave?)

From my understanding, a nandroid would restore your data just fine (assuming, of course, it actually restores your data just fine ;) ).

It seems like problems only occur when people pull their battery, so, don't pull your battery. I've been using no journaling for a couple months now and haven't had any problems (knock on wood).
 
  • Like
Reactions: traumahawk
Yes, restoring an earlier nandroid backup will get rid of data corruption you've gotten since that backup. I've also gotten a few FCs from doing the 3-button reset, so I would avoid that as well.
 
From wikipedia:

"Updating file systems to reflect changes to files and directories usually requires many separate write operations. This makes it possible for an interruption (like a power failure or system crash) between writes to leave data structures in an invalid intermediate state.[1]

For example, deleting a file on a Unix file system involves two steps:

Removing its directory entry.
Marking space for the file and its inode as free in the free space map.

If a crash occurs between steps 1 and 2, there will be an orphaned inode and hence a storage leak. On the other hand, if only step 2 is performed first before the crash, the not-yet-deleted file will be marked free and possibly be overwritten by something else."

Basically, without journaling, the drive (or sdcard/or NAND) doesnt need as many write cycles for any given action. This has the benefit of increasing speed and lowering battery consumption, but it does so at the cost of leaving the "install" vulnerable to data corruption either through degraded internal storage (unallocated sectors in a harddrive, or NANDs wearing out through use) or power loss (pulling the battery due to some bug with a ROM). I once had a Linux install suffer a power loss while doing a system update, and if it wasnt for journaling, I would have lost everything. The journal ended up allowing me via fsck to fix the filesystem (repair inode 0843? y/n a thousand times), and then being reasonably literate with APT and dpkg I was able to get the install back to a working state- no journaling and my personal data would have been toast (at the time I had no backup and my / partition was also my /home partition).

As for Android, I dont think its bad to disable journaling, at least so long as two conditions are met:
1) You get a new ROM up and perfect, then immediately make a CWM backup of it.
2) Any important data is backed up manually or via recovery options like MyBackup Root, etc..

**EDIT** I dont know about you, but aside from CWM backups, I usually always keep the zip package of at least one good stable rom (ACE for me, no doubt) whenever im out in the wild with a new heavily tweaked rom (baked snack, syndicate, bonsai, etc) on my SD card.
 

Trending Posts

Forum statistics

Threads
956,844
Messages
6,970,280
Members
3,163,642
Latest member
microsofthope