[PATCH] Clear spinlocks in TDB

Jelmer Vernooij jelmer at samba.org
Sun Aug 12 12:29:44 GMT 2007


Am Sonntag, den 12.08.2007, 12:48 +0200 schrieb Volker Lendecke: 
> On Tue, Aug 07, 2007 at 04:59:16PM +0200, Jelmer Vernooij wrote:
> > TDB currently has trouble opening old TDB files that were using
> > spinlocks. The attached patch tries to clear up the remaining spinlocks
> > if TDB has exclusive write access to the file and should thus allow
> > opening older databases that have spinlocks enabled. 
> > 
> > The clear_spinlocks() code comes from an old version of TDB.
> > 
> > This was mostly cut-n-paste, I'm familiar with the nasty details of the
> > locking in TDB. Can somebody more familiar with the old spinlock code
> > review this patch ?
> Not having looked too closely, can't we get a flag for
> tdbbackup that would just overwrite the spinlock flag before
> tdb_open()ing the source tdb? This would not mess with the
> main tdb code path and could be marked as an emergency
> measure. The admin would have to make sure himself that
> nobody uses the tdb.
Debian currently contains a very old copy of standalone TDB that has
been built with spinlocks and users have been developing with this
version. Introducing a new version of TDB breaks all of their existing
databases.

If possible I would rather avoid any manual intervention by users when
they upgrade their TDB package. We can of course also keep the patch in
just the Debian package. 

Cheers,

Jelmer

-- 
Jelmer Vernooij <jelmer at samba.org> - http://samba.org/~jelmer/
Jabber: jelmer at fsfe.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 307 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : http://lists.samba.org/archive/samba-technical/attachments/20070812/fe1fba16/attachment.bin


More information about the samba-technical mailing list