Re: [Yaffs] yaffs problem: !!!!!!!!! Allocator out !!!!!!!!!…

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Charles Manning
Date:  
To: Paul Wang
CC: yaffs
Subject: Re: [Yaffs] yaffs problem: !!!!!!!!! Allocator out !!!!!!!!!!!!!!!!!
On Tuesday 24 October 2006 16:27, Paul Wang wrote:
> Hi,
>
> Thanks for your valuable answer.
> Yes, I forget to erase the mtdblock first.
>
> After I used "mkyaffs" to erase the block, It shows from /proc/yaffs that
> nEraseblocks is 815. I can write some files without the errors.
>
> Then I got another problem, after I write some files(the total blocksize is
> 13M and I write around 5M data), the nEraseblock went down to 0 and I got
> the same error message again. Even I delete some files and the nEraseblock
> is always 0.
> That means the flash is not fully released.
>
> How to do the garbage collection?
> How can my application know when to do the garbage collection?


The garbage collection is done automatically by yaffgs as a by-product of any
operation that modifies the file system.

It seems to me that one of two things has happened here:
1) Garbage collection triggering is broken somehow, so yaffs does not triger
garbage collection.
2) The garbage collection is failing because the erasure is failing or some
simil;ar problem. Thsi means that attempts to do garbage collection do not
free up any space.

Try turning on tracing for YAFFS_TRACE_ALLOCATE, YAFFS_TRACE_GC and
YAFFS_TRACE_GC_DETAIL. These should give a far better indication of what is
happening.



>
> Regards
> Paul
> ----- Original Message -----
> From: "Charles Manning" <>
> To: <>
> Cc: "Paul Wang" <>; <>;
> <>; <>; <> Sent: Tuesday,
> October 24, 2006 8:23 AM
> Subject: Re: [Yaffs] yaffs problem: !!!!!!!!! Allocator out
> !!!!!!!!!!!!!!!!!
>
> On Sunday 22 October 2006 03:56, Paul Wang wrote:
> > Hello,
> >
> > Sorry to disturb, I saw you discussed this problem last month.
> > Is there any solution?
> >
> > I meet this problem and have no idea what to do.
> > Currently I'm using Linux 2.6.12.
> > And it's a 32M nand flash with 3 mtdbolcks.
> > first 3M bytes              reserved
> > following 16M bytes         file system(cramfs)
> > last 13M bytes              yaffs

> >
> > I can see it reports few bad blocks for the yaffs.
> > I always get this error message
> > -----------------
> > yaffs tragedy: no more eraased blocks
> > !!!!!!!!! Allocator out !!!!!!!!!!!!!!!!!
>
> This happens because you have no erased blocks to use for further
> allocation.
>
> > ---------------------
> > And what I did is just using VI to edit a file(no more than 30 bytes).
> >
> > I have attached the /proc/yaffs file and the message during linux start
> > up.
>
> From the /proc/yaffs
>
> nErasedBlocks...... 0
>
> What you don't say is when you captured the /proc/yaffs and how you got the
> system into this state.
>
> There should never be fewer than about 5 erased blocks.
>
> Can you do the following:
>
> 1) Erase partition
> 2) Mount
> 3) capture /proc/yaffs and output from ls -ial
> 4) Do whatever it is you do to get into this state. With some explanation.
> 5) capture /proc/yaffs.
>
>
> Thanx
>
> -- Charles