[PATCH] tdb: recycle dead records always at chain top

Volker Lendecke Volker.Lendecke at SerNet.DE
Wed Apr 2 06:49:40 MDT 2014

On Tue, Apr 01, 2014 at 01:49:45PM +0200, Michael Adam wrote:
> Hi,
> based on Volker's patches from a couple of days ago,
> here is a patch that simplifies the code a bit
> (removes an almost-duplication). It changes the
> semantics in that when recycling a record from the
> chain to which the record-to-be-stored belongs,
> we do not leave it in place and more but put it
> to the top of the chain too (as with freelist records
> and records recycled from other chains).
> This may give an advantage when trying to find the record
> again soon, but a disadvantage are the two
> additional tdb_ofs_write calls.
> Thoughts?

That looks good to me. 13 insertions(+), 43 deletions(-)
should be argument enough, and I believe that a
DLIST_PROMOTE outweighs the tdb_write_ofs calls, although I
also think this will completely be hidden in noise.

Reviewed-by: Volker Lendecke <vl at samba.org>

But please give it a bit before pushing, maybe others have
other opinions here.


SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de

More information about the samba-technical mailing list