[Q] Android ext4 recalculate total blocks

1 posts
Thanks Meter: 0
By aaronn.campbell, Junior Member on 27th August 2014, 01:31 AM
Post Reply Subscribe to Thread Email Thread
I suspect that I am losing some storage blocks in ext4 when my Android device looses power. Looking at StatFs information, the free block count is going down each time this happens, but the total block count remains the same. However, looking at ext4 source code, it appears that the StatFs call does nothing to recalculate the total block count, instead just returning a value from in storage (in the superblock).

Here is my question then: is there a way to recalculate the total block count at runtime? Or is there an allocated block count that is available somewhere other than through StatFs that I could add to the free block count ti find the real total block count?

Java, native code, and command line solutions are all acceptable.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes