1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

17 Commits

Author SHA1 Message Date
Andrew Bartlett
338e5a1d35 s3-dbwrap: push lp_ctx up another layer in the stack
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
2012-04-18 12:04:59 +10:00
Volker Lendecke
ba8f19c556 s3: Open up 3 levels of dbwrap_lock_order 2012-04-17 10:21:00 +02:00
Volker Lendecke
a49ac23a10 s3: Return CTDB_PATH from lp_ctdbd_socket()
All callers had that fallback
2012-04-17 10:21:00 +02:00
Volker Lendecke
1909af434e s3-dbwrap: Move "lock_order" initialization to db_open_xx 2012-03-16 11:20:10 +01:00
Volker Lendecke
d2068d33a4 s3: Pass down lock_order to db_open_ctdb 2012-01-18 14:48:04 +01:00
Volker Lendecke
333c92384b s3: Enforce a lock order in dbwrap
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.
2012-01-18 14:48:04 +01:00
Volker Lendecke
45e61fcf61 s3: Add a "lock_order" argument to db_open
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.
2012-01-18 14:48:04 +01:00
Volker Lendecke
4856033410 s3-dbwrap: Make dbwrap_fallback_wipe private 2011-12-08 15:03:43 +01:00
Volker Lendecke
5cda77d599 s3-dbwrap: Make dbwrap_fallback_parse_record private
We have the private fallback in dbwrap_parse_record anyway
2011-12-08 15:03:43 +01:00
Volker Lendecke
527dc2ed52 s3-dbwrap: Make dbwrap_fallback_fetch private 2011-12-08 15:03:43 +01:00
Volker Lendecke
4552c28d6d s3: Fix some blank line endings 2011-12-08 15:03:42 +01:00
Gregor Beck
dc4a5f5323 s3:dbwrap: add function dbwrap_wipe()
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-11 14:17:55 +02:00
Michael Adam
38f7f8e44d s3:dbwrap: move the db_open_tdb() prototype to a new header dbwrap_tdb.h 2011-10-11 14:17:55 +02:00
Michael Adam
82bc3fa81c s3:dbwrap: move the db_open_ctdb() prototype to a new header dbwrap_ctdb.h 2011-10-11 14:17:54 +02:00
Michael Adam
0b5c4a601a s3:dbwrap: move all .c and .h files of dbwrap to lib/dbwrap/
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Fri Jul 29 13:34:22 CEST 2011 on sn-devel-104
2011-07-29 13:34:22 +02:00
Michael Adam
2414fc88d8 s3:dbwrap: move db_is_local() from dbwrap.c to dbwrap_open.c 2011-07-29 12:23:13 +02:00
Michael Adam
1abdd9b2bb s3:dbwrap: move db_open() to a file dbwrap_open.c of its own.
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.
2011-07-29 12:23:13 +02:00