summaryrefslogtreecommitdiffstats
path: root/source3/lib/dbwrap/dbwrap_open.c
Commit message (Collapse)AuthorAgeFilesLines
* dbwrap_tdb: Use mutexes on demandVolker Lendecke2014-05-221-0/+19
| | | | | | | | Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Volker Lendecke <vl@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:build: remove global CLUSTER_SUPPORT defineStefan Metzmacher2014-03-241-7/+1
| | | | | | | | | | All ctdb specific code is isolated in samba-cluster-support.so now. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Mon Mar 24 19:08:44 CET 2014 on sn-devel-104
* s3:param: move lp_ctdbd_socket() to ctdbd_conn.cStefan Metzmacher2014-03-241-3/+1
| | | | | | | This allows us to use CTDB_PATH only in ctdbd_conn.c Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* dbwrap: use DBWRAP_LOCK_ORDER_VALID() in db_open()Michael Adam2014-02-071-9/+1
| | | | | | | | | | instead of the hand written test. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Feb 7 18:05:51 CET 2014 on sn-devel-104
* dbwrap: add dbwrap_flags argument to dbwrap_local_open()Michael Adam2014-02-071-1/+1
| | | | | | | | To be consistent with db_open() and prepare for future possible extensions. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* dbwrap_open: add 'dbwrap_optimize_readonly:* = yes' optionStefan Metzmacher2014-02-071-0/+25
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* dbwrap: add a dbwrap_flags argument to db_open_ctdb()Michael Adam2014-02-071-1/+1
| | | | | | | | This is in preparation of directly supporting ctdb read only record copies when opening a ctdb database from samba. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* dbwrap: add a dbwrap_flags argument to db_open()Michael Adam2014-02-071-1/+2
| | | | | | | | | | This is in preparation to support handing flags to backends, in particular activating read only record support for ctdb databases. For a start, this does nothing but adding the parameter, and all databases use DBWRAP_FLAG_NONE. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3-param: Rename loadparm_s3_context -> loadparm_s3_helpersAndrew Bartlett2012-06-271-1/+1
| | | | | | | | | | | | | | | | | This helps clarify the role of this structure and wrapper function. The purpose here is to provide helper functions to the lib/param loadparm_context that point back at the s3 lp_ functions. This allows a struct loadparm_context to be passed to any point in the code, and always refer to the correct loadparm system. If this has not been set, the variables loaded in the lib/param code will be returned. As requested by Michael Adam. Andrew Bartlett Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Jun 27 17:11:16 CEST 2012 on sn-devel-104
* dbwrap: dbwrap_local_open()Rusty Russell2012-06-221-3/+3
| | | | | | | | This simply opens a tdb: it will eventually switch depending on the extension. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* s3-dbwrap: push lp_ctx up another layer in the stackAndrew Bartlett2012-04-181-1/+4
| | | | | | | | | | This will allow db_open_tdb() to be called from common code, which may already have a loadparm context loaded. It also slowly moves the lp_ctx up the stack, as required to remove the library loop between smbconf and the registry. Andrew Bartlett
* s3: Open up 3 levels of dbwrap_lock_orderVolker Lendecke2012-04-171-4/+7
|
* s3: Return CTDB_PATH from lp_ctdbd_socket()Volker Lendecke2012-04-171-8/+0
| | | | All callers had that fallback
* s3-dbwrap: Move "lock_order" initialization to db_open_xxVolker Lendecke2012-03-161-4/+2
|
* s3: Pass down lock_order to db_open_ctdbVolker Lendecke2012-01-181-1/+2
|
* s3: Enforce a lock order in dbwrapVolker Lendecke2012-01-181-0/+3
| | | | | | | This makes sure we do not deadlock from doing two dbwrap_fetch_locked in two processes in different orders. At open time, we assign a strict order to all databases. lock_order 1 will be locked first, lock_order 2 second. No two records of the same lock order may be locked at the same time.
* s3: Add a "lock_order" argument to db_openVolker Lendecke2012-01-181-2/+17
| | | | | | | This will be used to enforce a lock hierarchy between the databases. We have seen deadlocks between locking.tdb, brlock.tdb, serverid.tdb and notify*.tdb. These should be fixed by refusing a dbwrap_fetch_locked that does not follow a defined lock hierarchy.
* s3-dbwrap: Make dbwrap_fallback_wipe privateVolker Lendecke2011-12-081-5/+0
|
* s3-dbwrap: Make dbwrap_fallback_parse_record privateVolker Lendecke2011-12-081-3/+0
| | | | We have the private fallback in dbwrap_parse_record anyway
* s3-dbwrap: Make dbwrap_fallback_fetch privateVolker Lendecke2011-12-081-3/+0
|
* s3: Fix some blank line endingsVolker Lendecke2011-12-081-3/+3
|
* s3:dbwrap: add function dbwrap_wipe()Gregor Beck2011-10-111-0/+3
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* s3:dbwrap: move the db_open_tdb() prototype to a new header dbwrap_tdb.hMichael Adam2011-10-111-0/+1
|
* s3:dbwrap: move the db_open_ctdb() prototype to a new header dbwrap_ctdb.hMichael Adam2011-10-111-0/+1
|
* s3:dbwrap: move all .c and .h files of dbwrap to lib/dbwrap/Michael Adam2011-07-291-1/+1
| | | | | Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Fri Jul 29 13:34:22 CEST 2011 on sn-devel-104
* s3:dbwrap: move db_is_local() from dbwrap.c to dbwrap_open.cMichael Adam2011-07-291-0/+27
|
* s3:dbwrap: move db_open() to a file dbwrap_open.c of its own.Michael Adam2011-07-291-0/+92
Also start new folder lib/dbwrap/ where dbwrap_open.c is stored and make the fallbacke implementation functoins non-static and create a dbwrap_private.h header file that contains their prototypes.