ctdb:vacuum: use plain tdb_repack() instead of ctdb_repack_tdb()
authorMichael Adam <obnox@samba.org>
Sat, 19 Apr 2014 00:53:29 +0000 (02:53 +0200)
committerMichael Adam <obnox@samba.org>
Tue, 17 Jun 2014 07:33:10 +0000 (09:33 +0200)
Since we usually have 0 records left for repack-deletion,
repacking is essentially used for the purpose of defragmenting
the freelist, we can use the vanilla tdb_repack function.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/server/ctdb_vacuum.c

index 18ea53d88ffe50f8541e0d6d2240395afb69f4a1..ee7bb0b32708c8823ed29de040aba399d92eb9d9 100644 (file)
@@ -1483,7 +1483,7 @@ static int ctdb_vacuum_and_repack_db(struct ctdb_db_context *ctdb_db,
        DEBUG(DEBUG_INFO, ("Repacking %s with %u freelist entries\n",
                           name, freelist_size));
 
-       if (ctdb_repack_tdb(ctdb_db->ltdb->tdb, mem_ctx, vdata) != 0) {
+       if (tdb_repack(ctdb_db->ltdb->tdb) != 0) {
                DEBUG(DEBUG_ERR,(__location__ " Failed to repack '%s'\n", name));
                talloc_free(vdata);
                return -1;