1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-17 02:05:21 +03:00
Rusty Russell 25c9eba372 tdb: cleanup: split brlock and brunlock methods.
This is taken from the CCAN code base: rather than using tdb_brlock for
locking and unlocking, we split it into brlock and brunlock functions.

For extra debugging information, brunlock says what kind of lock it is
unlocking (even though fnctl locks don't need this).  This requires an
extra argument to tdb_transaction_unlock() so we know whether the
lock was upgraded to a write lock or not.

We also use a "flags" argument tdb_brlock:
1) TDB_LOCK_NOWAIT replaces lck_type = F_SETLK (vs F_SETLKW).
2) TDB_LOCK_MARK_ONLY replaces setting TDB_MARK_LOCK bit in ltype.
3) TDB_LOCK_PROBE replaces the "probe" argument.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

(Imported from commit 452b4a5a6efeecfb5c83475f1375ddc25bcddfbe)

(This used to be ctdb commit 7b5fdc9c588237c83a1e70e5437e2e5510055b92)
2010-04-22 13:53:42 +09:30
..
2009-12-16 08:03:52 +01:00
2010-04-22 13:45:58 +09:30
2009-12-16 08:03:52 +01:00