This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
Re: jffs2 fix for small flash disks
- From: Øyvind Harboe <oyvind dot harboe at zylin dot com>
- To: Jonathan Larmour <jifl at eCosCentric dot com>
- Cc: ecos-patches at sources dot redhat dot com
- Date: Thu, 29 Apr 2004 09:22:14 +0200
- Subject: Re: jffs2 fix for small flash disks
- Organization: Zylin AS
- References: <1082380418.14501.10.camel@famine> <4090AC23.5030600@eCosCentric.com>
On Thu, 2004-04-29 at 09:17, Jonathan Larmour wrote:
> Øyvind Harboe wrote:
> > Index: current/src/build.c
> > ===================================================================
> > RCS file: /cvs/ecos/ecos/packages/fs/jffs2/current/src/build.c,v
> > retrieving revision 1.5
> > diff -a -u -w -r1.5 build.c
> > --- current/src/build.c 20 Nov 2003 16:52:36 -0000 1.5
> > +++ current/src/build.c 19 Apr 2004 13:11:54 -0000
> > @@ -259,6 +259,14 @@
> >
> > c->resv_blocks_write = c->resv_blocks_deletion + (size / c->sector_size);
> >
> > + // If the flash disk is smaller than resv_blocks_write, then we
> > + // allow writing to the disk anyway. The flash disk is then most likely
> > + // being used as write once - read many medimum, e.g. configuration of
> > + // static paramters.
> > + if (c->resv_blocks_write * c->sector_size > c->flash_size) {
> > + c->resv_blocks_write = 0;
> > + }
> > +
> > /* When do we let the GC thread run in the background */
> >
> > c->resv_blocks_gctrigger = c->resv_blocks_write + 1;
>
> Hi Øyvind,
>
> You need to submit this to the jffs2 project
> <http://sources.redhat.com/jffs2/>. I've applied it for now in the ecos
> tree, but the next merge from the upstream master jffs2 sources will
> overwrite it if you don't get it applied there.
>
> I suspect they may want to at least issue a warning in this situation though.
How would the warning be issued?
diag_printf()?
> Jifl
--
Øyvind Harboe
http://www.zylin.com