TDB: using the jenkins hash for non-persistent tdbs

Rusty Russell rusty at
Sun Sep 19 20:54:58 MDT 2010

On Fri, 17 Sep 2010 11:55:02 pm Stefan (metze) Metzmacher wrote:
> If the jenkins hash is used, we set the rwlocks field in the tdb header
> to a magic value.
> Current tdb versions expect this to be 0 and fail the open.

Unfortunately, this is an ABI break.  Someone using TDB and a non-default
hash won't be able to open their old TDBs any more.

My original version used the same trick, but I reluctantly replaced it with
your other 100% backwards-compatible version.  That's the price we pay for
exporting tdb as a standalone library.

The only way we could do this is as a separate flag to tdb_open, eg.
TDB_INCOMPATIBLE_HASH or something.  I'm not sure that's worthwhile though?


More information about the samba-technical mailing list