1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

ctdb:vacuum: use plain tdb_repack() instead of ctdb_repack_tdb()

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>
This commit is contained in:
Michael Adam 2014-04-19 02:53:29 +02:00
parent ec2f1abe48
commit 368683d7af

View 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;