Hello Charles,
Thank you for your answer.
Just to be sure. Are you talking about flags skip_checkpt_rd and
skip_checkpt_wr
Do you think this sequence is correct for resizing up ?
for the new partition size
1/ create yaffs device structure with skip_checkpt_rd=1 and
skip_checkpt_wr=1 and mount partition
2/ unmount partition and delete yaffs device structure
3/ same as 1 but without skipping checkpoint
4/ yaffs_sync on partition to have checkpoint saved
I tested with verbose messages (YAFF_TRACE_VERIFY, YAFFS_TRACE_CHECKPOINT
and YAFFS_TRACE_ALWAYS) and I didn't find strange messages
Best regards
Jean-Christophe
_____________________________________________________________________________________
Jean-Christophe GILLET | Schneider Electric | Industry Business -
Process Automation R&D | Firmware Engineer
Phone: +33 (0)4 92 13 3780 or 543780
Email:
jean-christophe.gillet@schneider-electric.com | Site:
www.schneider-electric.com | Address: 8ème Rue, ZI de Carros BP 147,
06516 Carros Cedex - France
*** Please consider the environment before printing this e-mail
De : Charles Manning <cdhmanning@gmail.com>
A : Jean-Christophe Gillet/Aut/Schneider@Europe,
Cc : YAFFS ML <yaffs@lists.aleph1.co.uk>
Date : 15/04/2015 09:11
Objet : Re: [Yaffs] yaffs2 - resize up
Hello Jean-Christophe
On Tue, Apr 14, 2015 at 8:36 PM, <
jean-christophe.gillet@schneider-electric.com> 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
______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
______________________________________________________________________