]> git.neil.brown.name Git - LaFS.git/commitdiff
keep ->cleaning list in order.
authorNeilBrown <neilb@suse.de>
Fri, 2 Jul 2010 23:19:10 +0000 (09:19 +1000)
committerNeilBrown <neilb@suse.de>
Sat, 3 Jul 2010 00:00:07 +0000 (10:00 +1000)
As we processes blocks from the segment in order, it is best
to keep them in order for later processing.
They will be sorted again when being added to a cluster,
but the more we help here, the better.

Signed-off-by: NeilBrown <neilb@suse.de>
clean.c

diff --git a/clean.c b/clean.c
index 95e2eaa5ad0f270fb89b04957625290c188ec299..17812c7c39eefc8b2ead7365c063611d1a9ca73c 100644 (file)
--- a/clean.c
+++ b/clean.c
@@ -423,7 +423,7 @@ static int try_clean(struct fs *fs, struct toclean *tc)
                                break;
 
                        if (list_empty(&b->cleaning)) {
-                               list_add(&b->cleaning, &tc->cleaning);
+                               list_add_tail(&b->cleaning, &tc->cleaning);
                                getdref(b, MKREF(cleaning));
                                igrab(ino);
                        }