]> git.neil.brown.name Git - LaFS.git/commit
Combine cleaning and orphan list_heads.
authorNeilBrown <neilb@suse.de>
Sat, 14 Aug 2010 05:41:59 +0000 (15:41 +1000)
committerNeilBrown <neilb@suse.de>
Sat, 14 Aug 2010 07:58:20 +0000 (17:58 +1000)
commite7b3664fe5f7b6227610c70d1c57efd8af51dfc5
tree4a060eaaac5bb8013195e45bd7197c44aaf47798
parent0b5cc41c58630d28bb04d3986a511093f2646ea0
Combine cleaning and orphan list_heads.

A datablock is very rarely both an orphan and requiring cleaning, so
having two list_heads is a waste.

If is an orphan it will have full parent linkage and addresses already
so it will be handled promptly and removed from the cleaning list.

So arrange that if a block wants to be both, it is preferentially on
the cleaning list, and when removed from the cleaning list is gets
added back to the pending_orphan list in case it needs processing.

Note that only directory and inode blocks can ever be orphans so some
optimisation of spinlocks is possible.

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