Re: [Yaffs] yaffs2 - resize up

Top Page
Attachments:
Message as email
+ (text/plain)
+ (text/html)
Delete this message
Reply to this message
Author: Charles Manning
Date:  
To: jean-christophe.gillet
CC: YAFFS ML
Subject: Re: [Yaffs] yaffs2 - resize up
Hello Jean-Christophe


On Tue, Apr 14, 2015 at 8:36 PM, <
> wrote:

> Hi,
>
> I would like to resize up a partition in a special use case.
>
> I have a 256MB nand chip with 2 yaffs partitions
> /boot of 32MB - nand blocks from 1 to 261
> /usr of 128MB - nand blocks from 262 to 1290
> nand blocks from 1291 to 2047 was never used and are clean
> The resize will be done only once and at boot time. /usr will be increased
> to 224MB (blocks from 262 to 2047)
>
> Because of yaffs2 architecture, do you think it is possible to resize up
> "/usr" partition without any issue on filesytem ?
>
> Jean-Christophe
> PS: my operating system is vxWorks
>
> Yes it is very possible to do this, but there are some important issues to
> doing this properly.
>
> Let us assume you're doing this while the Yaffs partition in NOT mounted,
> just to make things simpler...
>
> 1) Make sure the blocks you add are erased (or bad blocks). If you add
> blocks with data in them, then that will cause confusion.
> 2) Make sure the first time you mount after the change that the checkpoint
> is not used. This can be achieved by one of:
> a) Set flags so that the checkpoint is NOT saved.
> b) Set flags so that the checkpoint is ingroed when booting.
>
> If your system never writes a checkpoint (eg you always kill power and
> never do unmounts or other checkpoint writes) then you do not need to worry
> about (2). If that is the case, and the blocks were never written, then
> just expand the partition size and your job is done.
>
> You can even do a resize down of the file system, but that is a little
> more complicated.
>
> -- Charles
>
>
>