1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
samba-mirror/ctdb/config.mk
Andrew Tridgell 07ade5e488 this is a demonstration of an idea for handling locks in ctdb.
The problem we have is this:

  - we want the client smbd processes to be able to 'shortcut' access
    to the ltdb, by directly accessing the ltdb, and if the header of
    the record shows we are the dmaster then process immediately, with
    no overhead of talking across the unix domain socket

  - a client doing a shortcut will use tdb_chainlock() to lock the
    record while processing

  - we want the main ctdb daemon to be able to set locks on the
    record, and when those locks collide with a 'shortcut' fcntl lock,
    we want the ctdb daemon to keep processing other operations

  - we don't want to have to send a message from a smbd client to the
    ctdbd each time it releases a lock

The solution is shown in this example. Note that the expensive fork()
and blocking lock is only paid in case of contention, so in the median
case I think this is zero cost.

(This used to be ctdb commit a3248c3e2b740cd2403acffd3c1f6a33dca0ea03)
2007-04-16 16:01:37 +10:00

31 lines
619 B
Makefile

##################
[SUBSYSTEM::brlock_ctdb]
OBJ_FILES = brlock_ctdb.o
##################
[SUBSYSTEM::opendb_ctdb]
OBJ_FILES = opendb_ctdb.o
##################
[SUBSYSTEM::ctdb_tcp]
OBJ_FILES = \
tcp/tcp_init.o \
tcp/tcp_io.o \
tcp/tcp_connect.o
##################
[SUBSYSTEM::ctdb]
INIT_FUNCTION = server_service_ctdbd_init
OBJ_FILES = \
ctdb_cluster.o \
common/ctdb.o \
common/ctdb_call.o \
common/ctdb_message.o \
common/ctdb_ltdb.o \
common/ctdb_util.o \
common/ctdb_io.o \
common/ctdb_client.o \
common/ctdb_daemon.o
PUBLIC_DEPENDENCIES = LIBTDB LIBTALLOC
PRIVATE_DEPENDENCIES = ctdb_tcp