Re: JFFS2 Problem

Snehaprabha
2002-07-11T19:20:24Z

Thanks for the response.
I am running 2.4.17 Kernel. I have a limitation on the flash size (AMD flash
2MB with 64K erase block size). I am running our own bootloader which takes
up 3 erase blocks. Then I have the linux kernel that takes around 12 erase
blocks, leaving 17 erase blocks for the JFFS2 image. I have managed to fit in
most of the required pieces for the file system, which makes it 17 blocks.
Now the question is about the spare erase block required for GC.
I am confused with the #defines in fs/jffs2/nodelist.h

I have almost got it working with following values.

#define JFFS2_RESERVED_BLOCKS_BASE 1 /*3*/
#define JFFS2_RESERVED_BLOCKS_WRITE (JFFS2_RESERVED_BLOCKS_BASE + 1/*2*/)
#define JFFS2_RESERVED_BLOCKS_DELETION (JFFS2_RESERVED_BLOCKS_BASE /*+ 1*/)
#define JFFS2_RESERVED_BLOCKS_GCTRIGGER (JFFS2_RESERVED_BLOCKS_BASE /*+ 3*/)
#define JFFS2_RESERVED_BLOCKS_GCBAD (JFFS2_RESERVED_BLOCKS_BASE + 1)
#define JFFS2_RESERVED_BLOCKS_GCMERGE (JFFS2_RESERVED_BLOCKS_BASE)

I want to know what are correct and reasonable values?

Thanks
Sneha

On Thursday 11 July 2002 03:05 am, David Woodhouse wrote:
> nsnehaprabha@tnint11.telogy.design.ti.com said:
> > I copy a file, and delete it for several times; (You can think of a
> > case where a configuration file is written again and again).
> >
> > Depending on the space I had initially, it reaches a stage, where I
> > cannot copy the file any more though 'df' shows enough available
> > space for the file.
>
> Until recently there was a bug where we wouldn't reclaim the space if you
> renamed one file over another. Could it be that? If not, it's not a known
> problem.
>
> What version of the JFFS2 code are you using? Do you have a serial console?
> Can you set CONFIG_JFFS2_FS_DEBUG=1 and set the console loglevel to 9 so
> that all the resulting KERN_DEBUG messages are printed, then reproduce the
> problem while logging the output?