Strange automatic GC threshold ?

Josh Boyer jwboyer at linux.vnet.ibm.com
Mon Mar 19 13:03:54 EDT 2007


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





More information about the linux-mtd mailing list