linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* Find & remove orphan LEBs from UBIFS partition
@ 2014-01-17  9:39 Konstantin Tokarev
  2014-01-17 14:59 ` Artem Bityutskiy
  0 siblings, 1 reply; 4+ messages in thread
From: Konstantin Tokarev @ 2014-01-17  9:39 UTC (permalink / raw)
  To: linux-mtd

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.

-- 
Regards,
Konstantin

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Find & remove orphan LEBs from UBIFS partition
  2014-01-17  9:39 Find & remove orphan LEBs from UBIFS partition Konstantin Tokarev
@ 2014-01-17 14:59 ` Artem Bityutskiy
  2014-01-17 15:03   ` Konstantin Tokarev
  0 siblings, 1 reply; 4+ messages in thread
From: Artem Bityutskiy @ 2014-01-17 14:59 UTC (permalink / raw)
  To: Konstantin Tokarev; +Cc: linux-mtd

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?

-- 
Best Regards,
Artem Bityutskiy

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Find & remove orphan LEBs from UBIFS partition
  2014-01-17 14:59 ` Artem Bityutskiy
@ 2014-01-17 15:03   ` Konstantin Tokarev
  2014-01-17 15:06     ` Artem Bityutskiy
  0 siblings, 1 reply; 4+ messages in thread
From: Konstantin Tokarev @ 2014-01-17 15:03 UTC (permalink / raw)
  To: dedekind1@gmail.com; +Cc: linux-mtd@lists.infradead.org



17.01.2014, 18:59, "Artem Bityutskiy" <dedekind1@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.

-- 
Regards,
Konstantin

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Find & remove orphan LEBs from UBIFS partition
  2014-01-17 15:03   ` Konstantin Tokarev
@ 2014-01-17 15:06     ` Artem Bityutskiy
  0 siblings, 0 replies; 4+ messages in thread
From: Artem Bityutskiy @ 2014-01-17 15:06 UTC (permalink / raw)
  To: Konstantin Tokarev; +Cc: linux-mtd@lists.infradead.org

On Fri, 2014-01-17 at 19:03 +0400, Konstantin Tokarev wrote:
> 
> 17.01.2014, 18:59, "Artem Bityutskiy" <dedekind1@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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-01-17 15:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-17  9:39 Find & remove orphan LEBs from UBIFS partition Konstantin Tokarev
2014-01-17 14:59 ` Artem Bityutskiy
2014-01-17 15:03   ` Konstantin Tokarev
2014-01-17 15:06     ` Artem Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).