From 5334881afab42eae77bb2015ec21cbfe1df87807 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Sat, 15 Feb 2014 01:36:06 +0100 Subject: 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 Reviewed-by: Amitay Isaacs --- ctdb/server/ctdb_vacuum.c | 10 ++++------ 1 file 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; } /* -- cgit