X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=direct%2Ftest-framework%2Fyaffs_osglue.c;h=94ca24dfd225a73bde9924f6c51a73672ed1c89b;hp=2cc18bbdcb6bdec25eafef419df5caac894ed42a;hb=HEAD;hpb=0ca67da389c41a10ba51b85905a2437669c0471d diff --git a/direct/test-framework/yaffs_osglue.c b/direct/test-framework/yaffs_osglue.c index 2cc18bb..94ca24d 100644 --- a/direct/test-framework/yaffs_osglue.c +++ b/direct/test-framework/yaffs_osglue.c @@ -106,7 +106,13 @@ static void *bg_gc_func(void *dummy) while ((dev = yaffs_next_dev()) != NULL) { result = yaffs_do_background_gc_reldev(dev, urgent); - if (result > 0) + + /* result is 1 if more than half the free space is + * erased. + * If less than half the free space is erased then it is + * worth doing another background_gc operation sooner. + */ + if (result == 0) next_urgent = 1; }