tdb: Do a best fit search for dead records
commit255edd1b417480ab033c51165702c19fb5fff56f
authorVolker Lendecke <vl@samba.org>
Tue, 18 Mar 2014 06:46:38 +0000 (18 07:46 +0100)
committerMichael Adam <obnox@samba.org>
Tue, 18 Mar 2014 12:42:10 +0000 (18 13:42 +0100)
treeeb6de08e5a201ab4a785e8a833607103e944a2f1
parentd1ce0110f0a1666df4d1eb81e76631a90e9e5a73
tdb: Do a best fit search for dead records

Hash chains are (or can be made) short enough that a full search for the
best-fitting dead record is feasible. The freelist can become much longer,
there we don't do the full search but accept records which are too large.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
lib/tdb/common/tdb.c