Find & remove orphan LEBs from UBIFS partition
Artem Bityutskiy
dedekind1 at gmail.com
Fri Jan 17 10:06:01 EST 2014
On Fri, 2014-01-17 at 19:03 +0400, Konstantin Tokarev wrote:
>
> 17.01.2014, 18:59, "Artem Bityutskiy" <dedekind1 at gmail.com>:
> > On Fri, 2014-01-17 at 13:39 +0400, Konstantin Tokarev wrote:
> >
> >> 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?
>
> Yes, exactly.
Check 'fixup_free_space', it iterates over all useful ones, the rest can
be unmapped.
--
Best Regards,
Artem Bityutskiy
More information about the linux-mtd
mailing list