Strange automatic GC threshold ?

Joakim Tjernlund joakim.tjernlund at transmode.se
Mon Mar 19 13:21:43 EDT 2007


On Mon, 2007-03-19 at 12:03 -0500, Josh Boyer wrote:
> On Mon, 2007-03-19 at 16:49 +0000, MikeW wrote:
> > Joakim Tjernlund <joakim.tjernlund <at> transmode.se> writes:
> > 
> > > 
> > > In jffs2_thread_should_wake() there is this test to
> > > wake up GC thread:
> > > 
> > > 	if (c->nr_free_blocks + c->nr_erasing_blocks < c->resv_blocks_gctrigger &&
> > > 			(dirty > c->nospc_dirty_size))
> > > 
> > > The && in the above if means that no matter how dirty the FS is, it wont
> > > trigger GC until there is a very low count of free blocks as well(24 in my
> > > case out of 1003). I wonder if that && should be a || instead?
> > > 
> > >  Jocke
> > 
> > In the interests of clarity and robustness to edits, there should
> > be (  ) around the comparison subexpression at any rate.
> 
> Patches welcome :)
> 
> josh

How about thinking about the orginal question that made me send this
mail in the first place before sending any patches? :)

 Jocke




More information about the linux-mtd mailing list