Find & remove orphan LEBs from UBIFS partition
Hi all,
How can I find and remove LEBs which don't correspond to known files using internal API of UBIFS?
AFAIU, somethinng like this is done on recovery during mount, but in my case superblock is not dirty, so I'd like to force cleanup with custom mount option.
Signature · 2 lines
Regards, Konstantin
Quoted 8 lines · Konstantin Tokarev
Hi all,
How can I find and remove LEBs which don't correspond to known files using internal API of UBIFS?
AFAIU, somethinng like this is done on recovery during mount, but in my case superblock is not dirty, so I'd like to force cleanup with custom mount option.
Are you trying to do something like 'secure deletion' ? Disclosing your intentions would help understanding what you need. I do not quite understand.
Do you want to fine all LEBs which do not contain anything useful like data or meta-data, and unmap them?
Signature · 2 lines
Best Regards, Artem Bityutskiy
17.01.2014, 18:59, "Artem Bityutskiy" <[email protected]>:
Quoted 10 lines · Konstantin Tokarev
Quoted 8 lines
Hi all,
How can I find and remove LEBs which don't correspond to known files using internal API of UBIFS?
AFAIU, somethinng like this is done on recovery during mount, but in my case superblock is not dirty, so I'd like to force cleanup with custom mount option.
Quoted 6 lines
Are you trying to do something like 'secure deletion' ? Disclosing your intentions would help understanding what you need. I do not quite understand.
Do you want to fine all LEBs which do not contain anything useful like data or meta-data, and unmap them?
Yes, exactly.
Signature · 2 lines
Regards, Konstantin
Quoted 12 lines · Konstantin Tokarev
17.01.2014, 18:59, "Artem Bityutskiy" <[email protected]>:
Quoted 10 lines · Konstantin Tokarev
Quoted 8 lines
Hi all,
How can I find and remove LEBs which don't correspond to known files using internal API of UBIFS?
AFAIU, somethinng like this is done on recovery during mount, but in my case superblock is not dirty, so I'd like to force cleanup with custom mount option.
Quoted 8 lines
Quoted 6 lines
Are you trying to do something like 'secure deletion' ? Disclosing your intentions would help understanding what you need. I do not quite understand.
Do you want to fine all LEBs which do not contain anything useful like data or meta-data, and unmap them?
Yes, exactly.
Check 'fixup_free_space', it iterates over all useful ones, the rest can be unmapped.
Signature · 2 lines
Best Regards, Artem Bityutskiy