From peterlingoal@gmail.com Fri May 18 02:40:06 2012
Received: from mail-lb0-f177.google.com ([209.85.217.177])
	by stoneboat.aleph1.co.uk with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16)
	(Exim 4.72) (envelope-from <peterlingoal@gmail.com>)
	id 1SVCAg-0006UE-7o
	for yaffs@lists.aleph1.co.uk; Fri, 18 May 2012 02:40:06 +0100
Received: by lbbgg6 with SMTP id gg6so2068401lbb.8
	for <yaffs@lists.aleph1.co.uk>; Thu, 17 May 2012 18:39:52 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:in-reply-to:references:from:date:message-id:subject:to
	:cc:content-type;
	bh=HvNdq6tEsknmRMUfhogtgam/5ob/3E7Xqb3sMLlnI/c=;
	b=c5UtZyL4cXXNs0TCpSU6jB+R4HCNQ3hGRconb1ZOCFDTJpiq1JLxOITeL/Ow928OXG
	z5XPK0kVXoWT1dk1zAAPu7BZaWP+wMaGAE6ZIn83q47Gj58AvD2TTarX+i2EOGuclG6P
	c4dEAMEhwvcY3mQOrCJT7FZAOrm3YqXnarblSSN0000zTNfPLDFPs1O5yhEC+pAWbRYz
	BkH1B28OJvZvOqqwy4EXyKMcdCwPmPg9FGG61EPZFTkQHnN4YyLe1vIqAQrQdkl3ASZi
	mdgLMrlkf4XRNqoxUopGViMvSjrh9ZTc366cQmwbZHwXEtjkEA5kga3BztnsOMSvX+DO
	3DUw==
Received: by 10.152.147.33 with SMTP id th1mr9361143lab.9.1337305192022; Thu,
	17 May 2012 18:39:52 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.112.100.3 with HTTP; Thu, 17 May 2012 18:39:31 -0700 (PDT)
In-Reply-To: <201205180926.44481.manningc2@actrix.gen.nz>
References: <B9E2893F-19A4-4F96-8023-8A8ED16CA8FE@gmail.com>
	<201205070708.20313.manningc2@actrix.gen.nz>
	<CAFV5biCavS=LX+8LKPBXNKzsGMpZgS77yFBhksRj5OZk8hMw-Q@mail.gmail.com>
	<201205180926.44481.manningc2@actrix.gen.nz>
From: peterlingoal <peterlingoal@gmail.com>
Date: Fri, 18 May 2012 09:39:31 +0800
Message-ID: <CAFV5biBwA1KZpyOpDOwmOzqgLk4EBr4_2d8Jqz6t1+hN+pEyzw@mail.gmail.com>
To: Charles Manning <manningc2@actrix.gen.nz>
Content-Type: multipart/alternative; boundary=e89a8f22c411ed433904c045a0d8
X-SA-Exim-Connect-IP: 209.85.217.177
X-SA-Exim-Mail-From: peterlingoal@gmail.com
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
	stoneboat.aleph1.co.uk
X-Spam-Level: 
X-Spam-Status: No, score=-2.6 required=4.5 tests=BAYES_00,FREEMAIL_FROM,
	HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.1
X-SA-Exim-Version: 4.2.1 (built Mon, 22 Mar 2010 06:51:10 +0000)
X-SA-Exim-Scanned: Yes (on stoneboat.aleph1.co.uk)
Cc: yaffs@lists.aleph1.co.uk
Subject: Re: [Yaffs] Disadvantage of using yaffs checkpointing?
X-BeenThere: yaffs@lists.aleph1.co.uk
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: Discussion of YAFFS NAND flash filesystem <yaffs.lists.aleph1.co.uk>
List-Unsubscribe: <http://lists.aleph1.co.uk/cgi-bin/mailman/options/yaffs>,
	<mailto:yaffs-request@lists.aleph1.co.uk?subject=unsubscribe>
List-Archive: <http://lists.aleph1.co.uk/lurker/list/yaffs.html>
List-Post: <mailto:yaffs@lists.aleph1.co.uk>
List-Help: <mailto:yaffs-request@lists.aleph1.co.uk?subject=help>
List-Subscribe: <http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs>,
	<mailto:yaffs-request@lists.aleph1.co.uk?subject=subscribe>
X-List-Received-Date: Fri, 18 May 2012 01:40:06 -0000

--e89a8f22c411ed433904c045a0d8
Content-Type: text/plain; charset=ISO-8859-1

Yes we are are using a pretty old version (back in Sep 2010), and now we
are trying to upgrade to latest.
Could you please help point out which checksum would prevent an old
checkpoint being used? Right now I could not simply try a new version as
the version mismatch would always force a re-scan.

BTW, HowYaffsWorks is a great document, however there's no download link in
yaffsDotnet. I didn't find this doc until I googled for the file directly.
Could this be fixed so newbie like me could read the document first before
asking questions?

Thanks,
Peter

On Fri, May 18, 2012 at 5:26 AM, Charles Manning <manningc2@actrix.gen.nz>wrote:

> On Thursday 17 May 2012 22:29:42 peterlingoal wrote:
> > After spending sometime looking around in my corrupted NAND, I think I am
> > clear what's going on there:
> >
> > There's some *outdated* checkpoint block in the bad blocks portion, and
> the
> > real good one is located at a later block. During mounting, yaffs firstly
> > found the *outdate* checkpoint block and loaded from there. That's why
> > loading from checkpoint will always result a corrupted FS, even after
> > re-scanning all the blocks with no-checkpoing-read.
> >
> > now the question part:
> >
> >    1. why in the first place there's some checkpoint block 'left over' in
> >    the bad blocks? shall they be erased?
> It is generally a bad idea to erase bad blocks.
> >    2. While looking for a checkpoint block, shall the block status be
> >    checked? Or is there any better way to handle this situation? I simply
> > used mtd->block_isbad and continue searching and it seemed working.
> That should be happening. I'll fix it if that is broken.
>
> Now my question :-):
> Are you using an old version of yaffs or the latest? There are various
> checksums on the checkpoint data which should fail if old data is found.
>
> >
> > regards,
> > Peter
> >
> > On Mon, May 7, 2012 at 3:08 AM, Charles Manning
> <manningc2@actrix.gen.nz>wrote:
> > > On Friday 04 May 2012 00:30:55 peterlingoal wrote:
> > > > Hi Charles,
> > > >
> > > > Thanks for the reply.
> > > >
> > > > I am quite confused about the bad block management methodology, seems
> > >
> > > both
> > >
> > > > MTD and yaffs2 have some kind of bad block control. The problem of my
> > >
> > > case
> > >
> > > > is, after some period of usage, the yaffs2 file system on some NAND
> > > > begin to fail. Remounting with ignoring checkpoint could recover the
> > > > file
> > >
> > > system,
> > >
> > > > but for once only. The file system is still boomed after reboot and
> > > > mount (with checkpoint).
> > > >
> > > > I tried to read the codes of yaffs2 about scanning if checkpoint is
> > > > ignored, and got confused. Seems yaffs2 driver is querying status of
> > > > each block (in function yaffs2_scan_backwards). My question is:
> > >
> > > I suggest you read the HowYaffsWords doc. You can find that on
> > > yaffs.netor find the openoffice doc on the yaffs git.
> > >
> > > >    1. what does function yaffs2_scan_backwards do?
> > >
> > > This function scans the nand partition if there is no checkpoint. It
> > > reads the
> > > tags and builds up the file system state.
> > >
> > > >    2. MTD keeps a BBT (in NAND in my case), how does yaffs2 module
> > >
> > > obtains
> > >
> > > >    the BBT information? Why rescan from backward is needed in my case
> > > > in order to recover a file system.
> > >
> > > Yaffs calls the MTD function to determine if a block is good or bad.
> > > Yaffs does not know or care if mtd used a bad block table or not.
> > >
> > > >    3. After recovering the system, seems the bad block information is
> > > > not saved. So re-scan is still needed after a reboot. This is my
> guess,
> > > > please correct me if I am wrong.
> > > >
> > > > Also I am using a quite old version of yaffs2 ( back in 2010). What's
> > > > the most recommended stable version of yaffs2,
> > >
> > > I suggest using a more recent version. I would recommend using the
> > > current HEAD.
> > >
> > > > and the kernel MTD driver
> > > > version?
> > >
> > > Sorry I don't keep current with all mtd changes and cant't advise that
> > > off the
> > > top of my head.
> > >
> > > > To cut some boot up time I am saving BBT on NAND and reuse it
> > > > after reboot, will this make any negative impact?
> > >
> > > I don't see that this will cause any problems. yaffs does not care how
> or
> > > if
> > > you store bbt info.
> > >
> > > > I am interested in block
> > > > summaries, but I would like to stick to checkpoint at the moment.
> > >
> > > If you use the new code you will get summaries as part of the
> > > improvement.
> > >
> > > > I am new to kernel level debugging, so I am quite lost here. Any help
> > > > is appreciated. Thanks!
> > >
> > > We've all been there.
> > >
> > > > regards,
> > > > Peter
> > > >
> > > > On Mon, Apr 30, 2012 at 7:41 AM, Charles Manning
> > >
> > > <manningc2@actrix.gen.nz>wrote:
> > > > > On Saturday 28 April 2012 05:26:23 Peter Lin wrote:
> > > > > > I have several NANDs that yaffs2 module would consider itself
> > > > >
> > > > > successfully
> > > > >
> > > > > > recovered from check pointing and skip scanning, but the
> filesystem
> > >
> > > is
> > >
> > > > > not
> > > > >
> > > > > > usable. Mounting with option no-checkpoint-read could recover the
> > > > > > filesystem.
> > > > > >
> > > > > > I understand that bad block management shall be provided from MTD
> > > > > > layer, and rescanning fixing the problem proved MTD is doing his
> > > > > > job. But I do have some questions:
> > > > > >
> > > > > > 1. why in the first place the check point restoring succeeded but
> > >
> > > left
> > >
> > > > > > a corrupted filesystem?
> > > > >
> > > > > It is impossible to say with so little info.
> > > > >
> > > > > > 2. What would happen if a used block become a bad
> > > > > > block?
> > > > >
> > > > > That block will not be scanned. But blocks don't just"go bad". We
> > > > > have
> > >
> > > to
> > >
> > > > > mark
> > > > > them as bad, That normally means we have timne to extract the
> useful
> > >
> > > data
> > >
> > > > > first.
> > > > >
> > > > > > will the whole filesystem got crazy?
> > > > >
> > > > > No. Yaffs uses a log structure with tags. That means there is no
> > >
> > > "master
> > >
> > > > > table" or such which holds all the information.
> > > > >
> > > > > > Any way to recover from it?
> > > > > >
> > > > > > 3.
> > > > > > Any way to check or indicate an inconsistence in the filesystem,
> so
> > >
> > > the
> > >
> > > > > > mounting script could try with the option no-checkpoint-read?
> > > > >
> > > > > There is no such provision at present. Since there is no scanning
> if
> > >
> > > the
> > >
> > > > > checkpoint works, it is really hard to see how you would decise
> that
> > >
> > > the
> > >
> > > > > checkpoint was bad.
> > > > >
> > > > > If you are having problems with checkpoint, then consider just
> > > > > turning
> > >
> > > it
> > >
> > > > > off.
> > > > > Since block summaries were introduced, the boot speed up benefits
> of
> > > > > checkpointing are not as dramatic as they were.
> > > > >
> > > > > > Thanks for your work and help. Please let me know if there's any
> > > > > > mistake
> > > > >
> > > > > in
> > > > >
> > > > > > my understanding.
> > > > > >
> > > > > > regards,
> > > > > > Peter
> > > > > >
> > > > > > does the official kernel has this function enabled or is there
> any
> > > > > > option that controls it?
> > > > > >
> > > > > > On 2010-03-04 20:55, Charles Manning wrote:
> > > > > > > On Friday 05 March 2010 07:14:59 Shivdas Gujare wrote:
> > > > > > > > Hi Charles,
> > > > > > > >
> > > > > > > > Thanks lot for your help.
> > > > > > > >
> > > > > > > > On Wed, Mar 3, 2010 at 12:34 PM, Charles Manning
> > > > > > > >
> > > > > > > > wrote:
> > > > > > > > > On Wednesday 03 March 2010 23:33:31 Sven Van Asbroeck
> wrote:
> > > > > > > > >> Hello Shivdas,
> > > > > > > > >>
> > > > > > > > >> > So, what does actually "check pointing" saves while
> > > > > > > > >> > unmount?
> > > > > > > > >>
> > > > > > > > >> It's my understanding that the check point consists of the
> > > > > > > > >> RAM
> > > > >
> > > > > data
> > > > >
> > > > > > > > >> structure which is assembled when a yaffs partition is
> > >
> > > scanned.
> > >
> > > > > > > > >> It consists of meta-information associated with each chunk
> > > > > > > > >> and block. If you'd like to know more, I recommend reading
> > > > > > > > >> the
> > >
> > > 'How
> > >
> > > > > > > > >> Yaffs works' document, which is available in CVS.
> > > > > > > > >
> > > > > > > > > A full scan builds up a set of data structures that define
> > > > > > > > > the file system state. A checkpoint captures a reduced
> > > > > > > > > version of that,
> > > > >
> > > > > enough
> > > > >
> > > > > > > > > to reconstitute the main part of the state and the rest can
> > > > > > > > > be
> > > > >
> > > > > built
> > > > >
> > > > > > > > > up on a lazy basis.
> > > > > > > > >
> > > > > > > > >> > and Is it
> > > > > > > > >> > safe to use check-pointing always in final product?
> > > > > > > > >>
> > > > > > > > >> According to Charles, checkpointing is designed to be used
> > > > > > > > >> in the way you describe. To my knowledge, no open
> > > > > > > > >> checkpointing issues exist, but you should search the
> > > > > > > > >> archives. If you are concerned about the checkpoint
> > > > > > > > >> diverging from the
> > > > > > > > >> meta-information on flash, you could a) disable
> > > > > > > > >> checkpointing altogether, or b) submit a
> > > > >
> > > > > patch
> > > > >
> > > > > > > > >> implementing a checkpoint counter ;-)
> > > > > > > > >
> > > > > > > > > You can also choose to mount ignoring checkpointing with
> > > > > > > > >
> > > > > > > > > mount -t yaffs2 -o"no-checkpoint-read" ..
> > > > > > > >
> > > > > > > > This is not the option for me, since in final product, end
> user
> > > > >
> > > > > should
> > > > >
> > > > > > > > not be able
> > > > > > > > to change system data (i.e. mount flag's.) Or I can't change
> it
> > > > >
> > > > > unless
> > > > >
> > > > > > > > rootfs is flashed
> > > > > > > > on device, since yaffs2/nand partitions are mounted from rcS
> > > > > > > > script.
> > > > > > >
> > > > > > > You don't need to do this. Just leave checkpointing on.
> > > > > > >
> > > > > > > -- CHarles
> > > > > > >
> > > > > > >
> > > > > > > -- Charles
> > > > > >
> > > > > > -Peter
> > > > > > _______________________________________________
> > > > > > yaffs mailing list
> > > > > > yaffs@lists.aleph1.co.uk
> > > > > > http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs
> > >
> > > _______________________________________________
> > > yaffs mailing list
> > > yaffs@lists.aleph1.co.uk
> > > http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs
>
>
>

--e89a8f22c411ed433904c045a0d8
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Yes we are are using a pretty old version (back in Sep 2010), and now we ar=
e trying to upgrade to latest.<div>Could you please help point out which ch=
ecksum would prevent an old checkpoint being used? Right now I could not si=
mply try a new version as the version mismatch would always force a re-scan=
.</div>

<div><br></div><div>BTW, HowYaffsWorks is a great document, however there&#=
39;s no download link in yaffsDotnet. I didn&#39;t find this doc until I go=
ogled for the file directly. Could this be fixed so newbie like me could re=
ad the document first before asking questions?</div>

<div><br></div><div>Thanks,</div><div>Peter<br><br><div class=3D"gmail_quot=
e">On Fri, May 18, 2012 at 5:26 AM, Charles Manning <span dir=3D"ltr">&lt;<=
a href=3D"mailto:manningc2@actrix.gen.nz" target=3D"_blank">manningc2@actri=
x.gen.nz</a>&gt;</span> wrote:<br>

<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div class=3D"im">On Thursday 17 May 2012 22=
:29:42 peterlingoal wrote:<br>
&gt; After spending sometime looking around in my corrupted NAND, I think I=
 am<br>
&gt; clear what&#39;s going on there:<br>
&gt;<br>
&gt; There&#39;s some *outdated* checkpoint block in the bad blocks portion=
, and the<br>
&gt; real good one is located at a later block. During mounting, yaffs firs=
tly<br>
&gt; found the *outdate* checkpoint block and loaded from there. That&#39;s=
 why<br>
&gt; loading from checkpoint will always result a corrupted FS, even after<=
br>
&gt; re-scanning all the blocks with no-checkpoing-read.<br>
&gt;<br>
&gt; now the question part:<br>
&gt;<br>
</div>&gt; =A0 =A01. why in the first place there&#39;s some checkpoint blo=
ck &#39;left over&#39; in<br>
<div class=3D"im">&gt; =A0 =A0the bad blocks? shall they be erased?<br>
</div>It is generally a bad idea to erase bad blocks.<br>
&gt; =A0 =A02. While looking for a checkpoint block, shall the block status=
 be<br>
<div class=3D"im">&gt; =A0 =A0checked? Or is there any better way to handle=
 this situation? I simply<br>
&gt; used mtd-&gt;block_isbad and continue searching and it seemed working.=
<br>
</div>That should be happening. I&#39;ll fix it if that is broken.<br>
<br>
Now my question :-):<br>
Are you using an old version of yaffs or the latest? There are various<br>
checksums on the checkpoint data which should fail if old data is found.<br=
>
<div class=3D"im"><br>
&gt;<br>
&gt; regards,<br>
&gt; Peter<br>
&gt;<br>
&gt; On Mon, May 7, 2012 at 3:08 AM, Charles Manning<br>
&lt;<a href=3D"mailto:manningc2@actrix.gen.nz">manningc2@actrix.gen.nz</a>&=
gt;wrote:<br>
&gt; &gt; On Friday 04 May 2012 00:30:55 peterlingoal wrote:<br>
&gt; &gt; &gt; Hi Charles,<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Thanks for the reply.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; I am quite confused about the bad block management methodolo=
gy, seems<br>
&gt; &gt;<br>
&gt; &gt; both<br>
&gt; &gt;<br>
&gt; &gt; &gt; MTD and yaffs2 have some kind of bad block control. The prob=
lem of my<br>
&gt; &gt;<br>
&gt; &gt; case<br>
&gt; &gt;<br>
&gt; &gt; &gt; is, after some period of usage, the yaffs2 file system on so=
me NAND<br>
&gt; &gt; &gt; begin to fail. Remounting with ignoring checkpoint could rec=
over the<br>
&gt; &gt; &gt; file<br>
&gt; &gt;<br>
&gt; &gt; system,<br>
&gt; &gt;<br>
&gt; &gt; &gt; but for once only. The file system is still boomed after reb=
oot and<br>
&gt; &gt; &gt; mount (with checkpoint).<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; I tried to read the codes of yaffs2 about scanning if checkp=
oint is<br>
&gt; &gt; &gt; ignored, and got confused. Seems yaffs2 driver is querying s=
tatus of<br>
&gt; &gt; &gt; each block (in function yaffs2_scan_backwards). My question =
is:<br>
&gt; &gt;<br>
&gt; &gt; I suggest you read the HowYaffsWords doc. You can find that on<br=
>
</div>&gt; &gt; yaffs.netor find the openoffice doc on the yaffs git.<br>
<div class=3D"HOEnZb"><div class=3D"h5">&gt; &gt;<br>
&gt; &gt; &gt; =A0 =A01. what does function yaffs2_scan_backwards do?<br>
&gt; &gt;<br>
&gt; &gt; This function scans the nand partition if there is no checkpoint.=
 It<br>
&gt; &gt; reads the<br>
&gt; &gt; tags and builds up the file system state.<br>
&gt; &gt;<br>
&gt; &gt; &gt; =A0 =A02. MTD keeps a BBT (in NAND in my case), how does yaf=
fs2 module<br>
&gt; &gt;<br>
&gt; &gt; obtains<br>
&gt; &gt;<br>
&gt; &gt; &gt; =A0 =A0the BBT information? Why rescan from backward is need=
ed in my case<br>
&gt; &gt; &gt; in order to recover a file system.<br>
&gt; &gt;<br>
&gt; &gt; Yaffs calls the MTD function to determine if a block is good or b=
ad.<br>
&gt; &gt; Yaffs does not know or care if mtd used a bad block table or not.=
<br>
&gt; &gt;<br>
&gt; &gt; &gt; =A0 =A03. After recovering the system, seems the bad block i=
nformation is<br>
&gt; &gt; &gt; not saved. So re-scan is still needed after a reboot. This i=
s my guess,<br>
&gt; &gt; &gt; please correct me if I am wrong.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Also I am using a quite old version of yaffs2 ( back in 2010=
). What&#39;s<br>
&gt; &gt; &gt; the most recommended stable version of yaffs2,<br>
&gt; &gt;<br>
&gt; &gt; I suggest using a more recent version. I would recommend using th=
e<br>
&gt; &gt; current HEAD.<br>
&gt; &gt;<br>
&gt; &gt; &gt; and the kernel MTD driver<br>
&gt; &gt; &gt; version?<br>
&gt; &gt;<br>
&gt; &gt; Sorry I don&#39;t keep current with all mtd changes and cant&#39;=
t advise that<br>
&gt; &gt; off the<br>
&gt; &gt; top of my head.<br>
&gt; &gt;<br>
&gt; &gt; &gt; To cut some boot up time I am saving BBT on NAND and reuse i=
t<br>
&gt; &gt; &gt; after reboot, will this make any negative impact?<br>
&gt; &gt;<br>
&gt; &gt; I don&#39;t see that this will cause any problems. yaffs does not=
 care how or<br>
&gt; &gt; if<br>
&gt; &gt; you store bbt info.<br>
&gt; &gt;<br>
&gt; &gt; &gt; I am interested in block<br>
&gt; &gt; &gt; summaries, but I would like to stick to checkpoint at the mo=
ment.<br>
&gt; &gt;<br>
&gt; &gt; If you use the new code you will get summaries as part of the<br>
&gt; &gt; improvement.<br>
&gt; &gt;<br>
&gt; &gt; &gt; I am new to kernel level debugging, so I am quite lost here.=
 Any help<br>
&gt; &gt; &gt; is appreciated. Thanks!<br>
&gt; &gt;<br>
&gt; &gt; We&#39;ve all been there.<br>
&gt; &gt;<br>
&gt; &gt; &gt; regards,<br>
&gt; &gt; &gt; Peter<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; On Mon, Apr 30, 2012 at 7:41 AM, Charles Manning<br>
&gt; &gt;<br>
&gt; &gt; &lt;<a href=3D"mailto:manningc2@actrix.gen.nz">manningc2@actrix.g=
en.nz</a>&gt;wrote:<br>
&gt; &gt; &gt; &gt; On Saturday 28 April 2012 05:26:23 Peter Lin wrote:<br>
&gt; &gt; &gt; &gt; &gt; I have several NANDs that yaffs2 module would cons=
ider itself<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; successfully<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; recovered from check pointing and skip scanning, b=
ut the filesystem<br>
&gt; &gt;<br>
&gt; &gt; is<br>
&gt; &gt;<br>
&gt; &gt; &gt; &gt; not<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; usable. Mounting with option no-checkpoint-read co=
uld recover the<br>
&gt; &gt; &gt; &gt; &gt; filesystem.<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; I understand that bad block management shall be pr=
ovided from MTD<br>
&gt; &gt; &gt; &gt; &gt; layer, and rescanning fixing the problem proved MT=
D is doing his<br>
&gt; &gt; &gt; &gt; &gt; job. But I do have some questions:<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; 1. why in the first place the check point restorin=
g succeeded but<br>
&gt; &gt;<br>
&gt; &gt; left<br>
&gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; a corrupted filesystem?<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; It is impossible to say with so little info.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; 2. What would happen if a used block become a bad<=
br>
&gt; &gt; &gt; &gt; &gt; block?<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; That block will not be scanned. But blocks don&#39;t ju=
st&quot;go bad&quot;. We<br>
&gt; &gt; &gt; &gt; have<br>
&gt; &gt;<br>
&gt; &gt; to<br>
&gt; &gt;<br>
&gt; &gt; &gt; &gt; mark<br>
&gt; &gt; &gt; &gt; them as bad, That normally means we have timne to extra=
ct the useful<br>
&gt; &gt;<br>
&gt; &gt; data<br>
&gt; &gt;<br>
&gt; &gt; &gt; &gt; first.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; will the whole filesystem got crazy?<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; No. Yaffs uses a log structure with tags. That means th=
ere is no<br>
&gt; &gt;<br>
&gt; &gt; &quot;master<br>
&gt; &gt;<br>
&gt; &gt; &gt; &gt; table&quot; or such which holds all the information.<br=
>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; Any way to recover from it?<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; 3.<br>
&gt; &gt; &gt; &gt; &gt; Any way to check or indicate an inconsistence in t=
he filesystem, so<br>
&gt; &gt;<br>
&gt; &gt; the<br>
&gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; mounting script could try with the option no-check=
point-read?<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; There is no such provision at present. Since there is n=
o scanning if<br>
&gt; &gt;<br>
&gt; &gt; the<br>
&gt; &gt;<br>
&gt; &gt; &gt; &gt; checkpoint works, it is really hard to see how you woul=
d decise that<br>
&gt; &gt;<br>
&gt; &gt; the<br>
&gt; &gt;<br>
&gt; &gt; &gt; &gt; checkpoint was bad.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; If you are having problems with checkpoint, then consid=
er just<br>
&gt; &gt; &gt; &gt; turning<br>
&gt; &gt;<br>
&gt; &gt; it<br>
&gt; &gt;<br>
&gt; &gt; &gt; &gt; off.<br>
&gt; &gt; &gt; &gt; Since block summaries were introduced, the boot speed u=
p benefits of<br>
&gt; &gt; &gt; &gt; checkpointing are not as dramatic as they were.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; Thanks for your work and help. Please let me know =
if there&#39;s any<br>
&gt; &gt; &gt; &gt; &gt; mistake<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; in<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; my understanding.<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; regards,<br>
&gt; &gt; &gt; &gt; &gt; Peter<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; does the official kernel has this function enabled=
 or is there any<br>
&gt; &gt; &gt; &gt; &gt; option that controls it?<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; On 2010-03-04 20:55, Charles Manning wrote:<br>
&gt; &gt; &gt; &gt; &gt; &gt; On Friday 05 March 2010 07:14:59 Shivdas Guja=
re wrote:<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; Hi Charles,<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; Thanks lot for your help.<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; On Wed, Mar 3, 2010 at 12:34 PM, Charles=
 Manning<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; wrote:<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; On Wednesday 03 March 2010 23:33:31=
 Sven Van Asbroeck wrote:<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt; Hello Shivdas,<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt; &gt; So, what does actually &qu=
ot;check pointing&quot; saves while<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt; &gt; unmount?<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt; It&#39;s my understanding that =
the check point consists of the<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt; RAM<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; data<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt; structure which is assembled wh=
en a yaffs partition is<br>
&gt; &gt;<br>
&gt; &gt; scanned.<br>
&gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt; It consists of meta-information=
 associated with each chunk<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt; and block. If you&#39;d like to=
 know more, I recommend reading<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt; the<br>
&gt; &gt;<br>
&gt; &gt; &#39;How<br>
&gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt; Yaffs works&#39; document, whic=
h is available in CVS.<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; A full scan builds up a set of data=
 structures that define<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; the file system state. A checkpoint=
 captures a reduced<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; version of that,<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; enough<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; to reconstitute the main part of th=
e state and the rest can<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; be<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; built<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; up on a lazy basis.<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt; &gt; and Is it<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt; &gt; safe to use check-pointing=
 always in final product?<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt; According to Charles, checkpoin=
ting is designed to be used<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt; in the way you describe. To my =
knowledge, no open<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt; checkpointing issues exist, but=
 you should search the<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt; archives. If you are concerned =
about the checkpoint<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt; diverging from the<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt; meta-information on flash, you =
could a) disable<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt; checkpointing altogether, or b)=
 submit a<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; patch<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt; implementing a checkpoint count=
er ;-)<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; You can also choose to mount ignori=
ng checkpointing with<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; mount -t yaffs2 -o&quot;no-checkpoi=
nt-read&quot; ..<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; This is not the option for me, since in =
final product, end user<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; should<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; not be able<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; to change system data (i.e. mount flag&#=
39;s.) Or I can&#39;t change it<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; unless<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; rootfs is flashed<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; on device, since yaffs2/nand partitions =
are mounted from rcS<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; script.<br>
&gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; You don&#39;t need to do this. Just leave che=
ckpointing on.<br>
&gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; -- CHarles<br>
&gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; -- Charles<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; -Peter<br>
&gt; &gt; &gt; &gt; &gt; _______________________________________________<br=
>
&gt; &gt; &gt; &gt; &gt; yaffs mailing list<br>
&gt; &gt; &gt; &gt; &gt; <a href=3D"mailto:yaffs@lists.aleph1.co.uk">yaffs@=
lists.aleph1.co.uk</a><br>
&gt; &gt; &gt; &gt; &gt; <a href=3D"http://lists.aleph1.co.uk/cgi-bin/mailm=
an/listinfo/yaffs" target=3D"_blank">http://lists.aleph1.co.uk/cgi-bin/mail=
man/listinfo/yaffs</a><br>
&gt; &gt;<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; yaffs mailing list<br>
&gt; &gt; <a href=3D"mailto:yaffs@lists.aleph1.co.uk">yaffs@lists.aleph1.co=
.uk</a><br>
&gt; &gt; <a href=3D"http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaf=
fs" target=3D"_blank">http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/ya=
ffs</a><br>
<br>
<br>
</div></div></blockquote></div><br></div>

--e89a8f22c411ed433904c045a0d8--

