This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: jffs2 fix for small flash disks


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




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]