summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2012-01-16 12:50:44 +0100
committerVolker Lendecke <vlendec@samba.org>2012-01-18 14:48:04 +0100
commitd2068d33a4adcb10037c63c092669efe7f077b8e (patch)
tree1de0c1fe27ee36b330e22b56369d9bef241444c2
parentb9e806050f65b3f787a797c125131200e59304d2 (diff)
downloadsamba-d2068d33a4adcb10037c63c092669efe7f077b8e.tar.gz
samba-d2068d33a4adcb10037c63c092669efe7f077b8e.tar.bz2
samba-d2068d33a4adcb10037c63c092669efe7f077b8e.zip
s3: Pass down lock_order to db_open_ctdb
-rw-r--r--source3/lib/dbwrap/dbwrap_ctdb.c6
-rw-r--r--source3/lib/dbwrap/dbwrap_ctdb.h5
-rw-r--r--source3/lib/dbwrap/dbwrap_open.c3
3 files changed, 10 insertions, 4 deletions
diff --git a/source3/lib/dbwrap/dbwrap_ctdb.c b/source3/lib/dbwrap/dbwrap_ctdb.c
index 0acaf67a31..e5c07f4b8e 100644
--- a/source3/lib/dbwrap/dbwrap_ctdb.c
+++ b/source3/lib/dbwrap/dbwrap_ctdb.c
@@ -1431,7 +1431,8 @@ static int db_ctdb_get_flags(struct db_context *db)
struct db_context *db_open_ctdb(TALLOC_CTX *mem_ctx,
const char *name,
int hash_size, int tdb_flags,
- int open_flags, mode_t mode)
+ int open_flags, mode_t mode,
+ enum dbwrap_lock_order lock_order)
{
struct db_context *result;
struct db_ctdb_ctx *db_ctdb;
@@ -1528,7 +1529,8 @@ struct db_context *db_open_ctdb(TALLOC_CTX *mem_ctx,
struct db_context *db_open_ctdb(TALLOC_CTX *mem_ctx,
const char *name,
int hash_size, int tdb_flags,
- int open_flags, mode_t mode)
+ int open_flags, mode_t mode,
+ enum dbwrap_lock_order lock_order)
{
DEBUG(3, ("db_open_ctdb: no cluster support!\n"));
return NULL;
diff --git a/source3/lib/dbwrap/dbwrap_ctdb.h b/source3/lib/dbwrap/dbwrap_ctdb.h
index 7898818ae4..bfbe3bde52 100644
--- a/source3/lib/dbwrap/dbwrap_ctdb.h
+++ b/source3/lib/dbwrap/dbwrap_ctdb.h
@@ -23,11 +23,14 @@
#include <talloc.h>
+#include "dbwrap/dbwrap_private.h"
+
struct db_context;
struct db_context *db_open_ctdb(TALLOC_CTX *mem_ctx,
const char *name,
int hash_size, int tdb_flags,
- int open_flags, mode_t mode);
+ int open_flags, mode_t mode,
+ enum dbwrap_lock_order lock_order);
#endif /* __DBWRAP_CTDB_H__ */
diff --git a/source3/lib/dbwrap/dbwrap_open.c b/source3/lib/dbwrap/dbwrap_open.c
index af24ed8847..731529680e 100644
--- a/source3/lib/dbwrap/dbwrap_open.c
+++ b/source3/lib/dbwrap/dbwrap_open.c
@@ -106,7 +106,8 @@ struct db_context *db_open(TALLOC_CTX *mem_ctx,
/* allow ctdb for individual databases to be disabled */
if (lp_parm_bool(-1, "ctdb", partname, True)) {
result = db_open_ctdb(mem_ctx, partname, hash_size,
- tdb_flags, open_flags, mode);
+ tdb_flags, open_flags, mode,
+ lock_order);
if (result == NULL) {
DEBUG(0,("failed to attach to ctdb %s\n",
partname));