Shrink UBIFS
Richard Weinberger
richard.weinberger at gmail.com
Sat Sep 30 11:09:16 PDT 2017
Ryan,
On Thu, Sep 28, 2017 at 1:43 PM, Ryan Meulenkamp
<Ryan.Meulenkamp at nedap.com> wrote:
> Hi,
>
>
> I'm planning to write an ioctl for shrinking a UBIFS to be able to resize the volume its on and create another
>
> volume because it is essential for our upgrade/migration flow. Do you guys have any advice for me? The
>
> hard part is that LEB's that would fall outside the new size should be moved inside the new size. From what
>
> I read, the garbage collection code could be used to accomplish this, but it is not really possible to define
>
> which LEB's to put where.
>
>
> Thanks in advance!
So, you want to implement _online_ shrinking?
This is a way more complicated, think of power-cuts.
I strongly suggest thinking about offline shrinking first.
You are right, the garbage collector might be useful, you could modify
it in a way
to move blocks away from to-be-removed LEBs.
But again, do you *really* need online shrinking?
--
Thanks,
//richard
More information about the linux-mtd
mailing list