Strange automatic GC threshold ?

MikeW mw_phil at yahoo.co.uk
Mon Mar 19 12:49:24 EDT 2007


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.

Regards,
MikeW






More information about the linux-mtd mailing list