jra at samba.org
Wed Apr 11 04:55:28 GMT 2007
On Tue, Apr 10, 2007 at 09:52:47PM -0700, Jeremy Allison wrote:
> On Wed, Apr 11, 2007 at 01:41:49PM +1000, tridge at samba.org wrote:
> > Volker, this seems to have been broken by r21303 in Samba3. Can you
> > remember why you removed the
> > tdb->locked[h].count = 0;
> > line in that commit? Without that line the tdb still thinks the tdb is
> > locked after a transaction cancel.
> > I know the code has to change, as lockrecs is now dynamic, but I think
> > we need something equivalent there. Perhaps we can just deleting the
> > list? You are not allowed to start a transaction when locks are held,
> > so we should be able to wipe the lock list when the transaction is
> > cancelled.
> I think you're correct. Here's a patch - let me know what
> you think.
> Index: tdb/common/transaction.c
> --- tdb/common/transaction.c (revision 22131)
> +++ tdb/common/transaction.c (working copy)
> @@ -523,6 +523,8 @@
> F_UNLCK,F_SETLKW, 0, 1);
> tdb->num_locks = 0;
> + tdb->num_lockrecs = 0;
> + SAFE_FREE(tdb->lockrecs);
> /* restore the normal io methods */
FYI: Fixing this is a show-stopper for 3.0.25
as the tdb transaction code is now used in the printing,
secrets, registry and share tdb's.
More information about the samba-technical