Re: [Yaffs] umount YAFFS2 block: the used NAND space was inc…

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Charles Manning
Date:  
To: yaffs
CC: albhuang
Subject: Re: [Yaffs] umount YAFFS2 block: the used NAND space was increased
On Wednesday 09 April 2014 22:11:54 Ketil Froyn wrote:
> If you set yaffs_auto_checkpoint to 0 it sounds like it'll write a
> checkpoint on unmount, so it wouldn't need to check the whole NAND on boot
> (if you do clean unmounts on shutdown). If you're aiming to save space, it
> might be worth trying 0 instead of the default 1, sounds like you'll get
> fewer checkpoints that way.


There is only ever, at maximum, one checkpoint per partition, thus turning
auto checkpointing on/off has no impact on the space used by the checkpoint
data.

The auto checkpointing will write a checkpoint if the system is idle for some
time. I don't really recommend this as being very useful.

In the days before block summaries, a checkpoint was very valuable because the
boot time difference between a full scan and a mount from checkpoint could be
large. Block summaries have closed the gab considerably, meaning the penalty
for not having a checkpoint is a lot less.

>
> There's also this, from the link I posted:
>
> skipCheckpointWrite
> Yaffs2 only: Flag to skip writing checkpoint on sync or unmount.
>
> That should probably get rid of all checkpoints if that's what you want,
> but since it's only listed under "Initialisation Parameters", maybe you
> have to set this on file system creation. Not even sure how, though.
>
> Sorry I can't be more specific, but my knowledge of yaffs2 is very
> theoretical, I have little practical experience using it. Charles would be
> the authority on this stuff.
>
> Regards, Ketil
>
> On 9 April 2014 11:47, albhuang <> wrote:
> > Hi Ketil,
> > A global variable, yaffs_auto_checkpoint, control the checkpoint action,
> > just like:
> > If 0 only checkpoint on unmount.
> > If 1 checkpoint on sync.
> > If 2 checkpoint on write_super and sync.
> > Default is 1.
> > I'd like to know what would happen if it was set to
> > zero(yaffs_auto_checkpoint = 0), only a little slow during booting
> > because it would check the whole NAND, was it?


You can force the checkpoint writing/reading to to skipped with the
no-checkpoint-read and no-checkpoint-write mount flags.

If there is no checkpoint, or the checkpoint is skipped, then yaffs2 will do a
scan (using block summaries if they are available).


> >
> > Thanks!
> >
> > ------------------------------
> > albhuang
> >
> > *From:* Ketil Froyn <>
> > *Date:* 2014-04-09 13:53
> > *To:* albhuang <>
> > *Subject:* Re: Re: [Yaffs] umount YAFFS2 block: the used NAND space was
> > increased
> >
> > Not sure how it can be disabled, but looking at
> > http://www.yaffs.net/yaffs-tuning-and-configuration#Initialisation_Parame
> >tersit seems possible.
> >
> > If you redo the math I think you will find that the difference was 128k
> > after all, but perhaps you did that already. :)
> >
> > On 9 Apr 2014 04:05, "albhuang" <> wrote:
> >> Ketil,
> >> It seemed the checkpoint action caused the error,could i abandon it, or
> >> anything could i do?
> >>
> >> Best Regards!
> >>
> >> ------------------------------
> >> albhuang
> >>
> >> *From:* Ketil Froyn <>
> >> *Date:* 2014-04-08 17:42
> >> *To:* albhuang <>
> >> *CC:* yaffs <>
> >> *Subject:* Re: [Yaffs] umount YAFFS2 block: the used NAND space was
> >> increased
> >> Could it perhaps be a yaffs2 checkpoint that was written on unmount so
> >> that it'll mount quickly next time?
> >>
> >> Cheers, Ketil
> >>
> >> On 8 April 2014 10:07, albhuang <> wrote:
> >>> Hi,
> >>> I utilized yaffs2 to K9F2G08(1Page=2K+64Bytes), the kernel was
> >>> linux2.6.12. All seemed OK except the command, umount, was executed,
> >>> the used space would be increased, each time, when a umount command
> >>> followed by the mount command. What's wrong with it.
> >>>
> >>> The following was the infoes.
> >>>
> >>> Thanks!
> >>>
> >>>  [root@INTUM /]$mount
> >>> /dev/mtdblock/5 on /mnt/database type yaffs2 (rw,noatime)
> >>> [root@INTUM /]$df
> >>> Filesystem           1k-blocks      Used Available Use% Mounted on
> >>> /dev/mtdblock/5         208896      1292    207604   1% /mnt/database
> >>> //the used space was 1292K

> >>>
> >>> [root@INTUM /]$umount /mnt/database/
> >>> save exit: isCheckpointed 1
> >>> [root@INTUM /]$mount -t yaffs2 /dev/mtdblock/5 /mnt/database/
> >>> yaffs: dev is 32505861 name is "mtdblock5"
> >>> yaffs: passed flags ""
> >>> yaffs: Attempting MTD mount on 31.5, "mtdblock5"
> >>> [root@INTUM /]$df
> >>> Filesystem           1k-blocks      Used Available Use% Mounted on
> >>> /dev/mtdblock/5         208896      1420    207476   1% /mnt/database  
> >>>              //the used space increased to 1420K

> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> _______________________________________________
> >>> yaffs mailing list
> >>>
> >>> http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs
> >>
> >> --
> >> -Ketil <http://ketil.froyn.name/>