]> git.neil.brown.name Git - LaFS.git/commit
Revise space allocation for cleaning.
authorNeilBrown <neilb@suse.de>
Mon, 28 Jun 2010 08:10:51 +0000 (18:10 +1000)
committerNeilBrown <neilb@suse.de>
Mon, 28 Jun 2010 08:10:51 +0000 (18:10 +1000)
commita37ad14465745f376aa2f2c973d9b0836ce4d854
tree8cec016c877bd279c046b93f8748f513e03b03ea
parent5aa6ca41c50a02c07298faab77e7f4b9fd154d78
Revise space allocation for cleaning.

We prefer to allocate whole segments for cleaning, but can only
do that if there is enough space.
If we cannot allocate whole segments, then just cleaning to the
main segment is perfectly acceptable.

So allow a 'clean_reserved' number which is a number of blocks that
have been reserved for cleaning - normally some number of segments.
The cleaner write whole segments while this number is big enough,
then gives up so the remainder will go to the main segment and not
create partial clean segments.

CleanSpace now never fails.  The next patch will cause the cleaner
to be more reserved in how much it asks for.

Signed-off-by: NeilBrown <neilb@suse.de>
block.c
clean.c
cluster.c
lafs.h
segments.c
state.h
super.c