Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[Q] Android ext4 recalculate total blocks

OP aaronn.campbell

27th August 2014, 01:31 AM   |  #1  
OP Junior Member
Thanks Meter: 0
 
1 posts
Join Date:Joined: Aug 2014
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
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes