[PATCH] Enable tdb mutex support in CTDB

Amitay Isaacs amitay at gmail.com
Sun Jun 29 23:50:20 MDT 2014


Hi metze,

On Wed, Jun 25, 2014 at 5:51 PM, Stefan (metze) Metzmacher <metze at samba.org>
wrote:

> Hi Amitay,
>
> > Here are the patches to enable tdb mutex support in ctdb.  It's possible
> to
> > enable the mutex support per node basis.
> >
> > Volker, I have modified your original patch to support building with
> older
> > version of tdb without mutex support (using configure check variable
> > USE_TDB_MUTEX_LOCKING).  Please sign-off if you are ok with it.
>
> You need to use tdb_runtime_check_for_robust_mutexes() before using
> TDB_MUTEX_LOCKING. Otherwise tdb_open_ex will fail instead of
> ignoring TDB_MUTEX_LOCKING (as the early development version did).
>

Done.


>
> You should use that instead of #ifdef USE_TDB_MUTEX_LOCKING
>

Without #ifdef, you cannot build CTDB with system tdb if it is older than
1.3.0.  So I have kept #ifdef TDB_MUTEX_LOCKING.


> Mutex support is a runtime decision not a configure time decision any
> more.
>

> Please test with and without '--disable-tdb-mutex-locking'.
>

The option --disable-tdb-mutex-locking only works if you are building tdb
library.  If you are using system tdb library to build CTDB,
--disable-tdb-mutex-locking does not do anything.  There should be a
warning if --disable-tdb-mutex-locking is used and building_tdb is false.

Modified patches are attached. Please review and push if ok.

Amitay.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ctdb.patches
Type: application/octet-stream
Size: 10418 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20140630/ad6eddc3/attachment.obj>


More information about the samba-technical mailing list