diff options
author | Michael Adam <obnox@samba.org> | 2014-02-15 01:36:06 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2014-06-17 09:33:10 +0200 |
commit | 5334881afab42eae77bb2015ec21cbfe1df87807 (patch) | |
tree | 80bc7272f1f05405dd247aaeaa7306300f5e0a4a | |
parent | 026d79cb009beba6987da6a6dd5fd98609140136 (diff) | |
download | samba-5334881afab42eae77bb2015ec21cbfe1df87807.tar.gz samba-5334881afab42eae77bb2015ec21cbfe1df87807.tar.xz samba-5334881afab42eae77bb2015ec21cbfe1df87807.zip |
ctdb:vacuum: always run freelist_size again
and not only if repack_limit != 0. This partially reverts
commit 48f2d1158820bfb063ba0a0bbfb6f496a8e7522.
With the new tdb code this defragments the
free list by merging adjacent records.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
-rw-r--r-- | ctdb/server/ctdb_vacuum.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/ctdb/server/ctdb_vacuum.c b/ctdb/server/ctdb_vacuum.c index 72703318c27..ce3c600bb3b 100644 --- a/ctdb/server/ctdb_vacuum.c +++ b/ctdb/server/ctdb_vacuum.c @@ -1344,12 +1344,10 @@ static int ctdb_vacuum_and_repack_db(struct ctdb_db_context *ctdb_db, DEBUG(DEBUG_ERR,(__location__ " Failed to vacuum '%s'\n", name)); } - if (repack_limit != 0) { - freelist_size = tdb_freelist_size(ctdb_db->ltdb->tdb); - if (freelist_size == -1) { - DEBUG(DEBUG_ERR,(__location__ " Failed to get freelist size for '%s'\n", name)); - return -1; - } + freelist_size = tdb_freelist_size(ctdb_db->ltdb->tdb); + if (freelist_size == -1) { + DEBUG(DEBUG_ERR,(__location__ " Failed to get freelist size for '%s'\n", name)); + return -1; } /* |