mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
more code rearrangement
(This used to be ctdb commit 2bcf3b16163041f03add2e5bf9f1f5fb3599ec24)
This commit is contained in:
parent
ae3d54094b
commit
b50096c835
@ -19,3 +19,6 @@ TAGS
|
|||||||
web/packages
|
web/packages
|
||||||
rec.lock
|
rec.lock
|
||||||
test.db
|
test.db
|
||||||
|
sock.1
|
||||||
|
sock.3
|
||||||
|
sock.4
|
||||||
|
@ -22,7 +22,8 @@ POPT_OBJ = @POPT_OBJ@
|
|||||||
|
|
||||||
CFLAGS=-g -I$(srcdir)/include -Iinclude -Ilib -Ilib/util -I$(srcdir) \
|
CFLAGS=-g -I$(srcdir)/include -Iinclude -Ilib -Ilib/util -I$(srcdir) \
|
||||||
-I@tallocdir@ -I@tdbdir@/include -I@libreplacedir@ \
|
-I@tallocdir@ -I@tdbdir@/include -I@libreplacedir@ \
|
||||||
-DVARDIR=\"$(localstatedir)\" -DETCDIR=\"$(etcdir)\" -DUSE_MMAP=1 @CFLAGS@ $(POPT_CFLAGS)
|
-DVARDIR=\"$(localstatedir)\" -DETCDIR=\"$(etcdir)\" \
|
||||||
|
-DUSE_MMAP=1 @CFLAGS@ $(POPT_CFLAGS)
|
||||||
|
|
||||||
LIB_FLAGS=@LDFLAGS@ -Llib @LIBS@ $(POPT_LIBS) @INFINIBAND_LIBS@
|
LIB_FLAGS=@LDFLAGS@ -Llib @LIBS@ $(POPT_LIBS) @INFINIBAND_LIBS@
|
||||||
|
|
||||||
@ -35,14 +36,15 @@ CTDB_COMMON_OBJ = common/ctdb_io.o common/util.o common/ctdb_util.o \
|
|||||||
CTDB_TCP_OBJ = tcp/tcp_connect.o tcp/tcp_io.o tcp/tcp_init.o
|
CTDB_TCP_OBJ = tcp/tcp_connect.o tcp/tcp_io.o tcp/tcp_init.o
|
||||||
|
|
||||||
CTDB_CLIENT_OBJ = client/ctdb_client.o \
|
CTDB_CLIENT_OBJ = client/ctdb_client.o \
|
||||||
$(CTDB_COMMON_OBJ) $(POPT_OBJ) $(UTIL_OBJ) @TALLOC_OBJ@ @TDB_OBJ@ @LIBREPLACEOBJ@ \
|
$(CTDB_COMMON_OBJ) $(POPT_OBJ) $(UTIL_OBJ) @TALLOC_OBJ@ @TDB_OBJ@ \
|
||||||
$(EXTRA_OBJ) @EVENTS_OBJ@
|
@LIBREPLACEOBJ@ $(EXTRA_OBJ) @EVENTS_OBJ@
|
||||||
|
|
||||||
CTDB_TAKEOVER_OBJ = takeover/system.o takeover/ctdb_takeover.o
|
CTDB_TAKEOVER_OBJ = takeover/system.o takeover/ctdb_takeover.o
|
||||||
|
|
||||||
CTDB_SERVER_OBJ = server/ctdbd.o server/ctdb_daemon.o server/ctdb_lockwait.o server/ctdb_recoverd.o \
|
CTDB_SERVER_OBJ = server/ctdbd.o server/ctdb_daemon.o server/ctdb_lockwait.o \
|
||||||
server/ctdb_recover.o server/ctdb_freeze.o server/ctdb_tunables.o server/ctdb_monitor.o \
|
server/ctdb_recoverd.o server/ctdb_recover.o server/ctdb_freeze.o \
|
||||||
server/ctdb.o server/ctdb_control.o server/ctdb_call.o server/ctdb_ltdb_server.o \
|
server/ctdb_tunables.o server/ctdb_monitor.o server/ctdb_server.o \
|
||||||
|
server/ctdb_control.o server/ctdb_call.o server/ctdb_ltdb_server.o \
|
||||||
server/ctdb_traverse.o $(CTDB_CLIENT_OBJ) \
|
server/ctdb_traverse.o $(CTDB_CLIENT_OBJ) \
|
||||||
$(CTDB_TAKEOVER_OBJ) $(CTDB_TCP_OBJ) @INFINIBAND_WRAPPER_OBJ@
|
$(CTDB_TAKEOVER_OBJ) $(CTDB_TCP_OBJ) @INFINIBAND_WRAPPER_OBJ@
|
||||||
|
|
||||||
@ -71,9 +73,9 @@ bin/ctdbd: $(CTDB_SERVER_OBJ)
|
|||||||
@echo Linking $@
|
@echo Linking $@
|
||||||
@$(CC) $(CFLAGS) -o $@ $(CTDB_SERVER_OBJ) $(LIB_FLAGS)
|
@$(CC) $(CFLAGS) -o $@ $(CTDB_SERVER_OBJ) $(LIB_FLAGS)
|
||||||
|
|
||||||
bin/ctdb: $(OBJS) tools/ctdb_control.o
|
bin/ctdb: $(CLIENT_OBJS) tools/ctdb.o
|
||||||
@echo Linking $@
|
@echo Linking $@
|
||||||
@$(CC) $(CFLAGS) -o $@ tools/ctdb_control.o $(CTDB_CLIENT_OBJ) $(LIB_FLAGS)
|
@$(CC) $(CFLAGS) -o $@ tools/ctdb.o $(CTDB_CLIENT_OBJ) $(LIB_FLAGS)
|
||||||
|
|
||||||
bin/ctdb_bench: $(CTDB_CLIENT_OBJ) tests/ctdb_bench.o
|
bin/ctdb_bench: $(CTDB_CLIENT_OBJ) tests/ctdb_bench.o
|
||||||
@echo Linking $@
|
@echo Linking $@
|
||||||
@ -88,7 +90,7 @@ bin/ibwrapper_test: $(CTDB_CLIENT_OBJ) ib/ibwrapper_test.o
|
|||||||
@$(CC) $(CFLAGS) -o $@ ib/ibwrapper_test.o $(CTDB_CLIENT_OBJ) $(LIB_FLAGS)
|
@$(CC) $(CFLAGS) -o $@ ib/ibwrapper_test.o $(CTDB_CLIENT_OBJ) $(LIB_FLAGS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o */*.o */*/*.o
|
rm -f *.o */*.o */*/*.o */*~
|
||||||
rm -f $(BINS) $(SBINS) $(TEST_BINS)
|
rm -f $(BINS) $(SBINS) $(TEST_BINS)
|
||||||
|
|
||||||
distclean: clean
|
distclean: clean
|
||||||
|
@ -2099,7 +2099,9 @@ struct ctdb_context *ctdb_init(struct event_context *ev)
|
|||||||
struct ctdb_context *ctdb;
|
struct ctdb_context *ctdb;
|
||||||
|
|
||||||
ctdb = talloc_zero(ev, struct ctdb_context);
|
ctdb = talloc_zero(ev, struct ctdb_context);
|
||||||
ctdb->ev = ev;
|
ctdb->ev = ev;
|
||||||
|
ctdb->idr = idr_init(ctdb);
|
||||||
|
CTDB_NO_MEMORY_NULL(ctdb, ctdb->idr);
|
||||||
|
|
||||||
return ctdb;
|
return ctdb;
|
||||||
}
|
}
|
||||||
|
@ -3,10 +3,10 @@
|
|||||||
killall -q ctdbd
|
killall -q ctdbd
|
||||||
|
|
||||||
echo "Starting 4 ctdb daemons"
|
echo "Starting 4 ctdb daemons"
|
||||||
bin/ctdbd --recovery-daemon --nlist direct/4nodes.txt
|
bin/ctdbd --recovery-daemon --nlist tests/4nodes.txt
|
||||||
bin/ctdbd --recovery-daemon --nlist direct/4nodes.txt --listen=127.0.0.2 --socket=/tmp/ctdb.socket.127.0.0.2
|
bin/ctdbd --recovery-daemon --nlist tests/4nodes.txt --listen=127.0.0.2 --socket=/tmp/ctdb.socket.127.0.0.2
|
||||||
bin/ctdbd --recovery-daemon --nlist direct/4nodes.txt --listen=127.0.0.3 --socket=/tmp/ctdb.socket.127.0.0.3
|
bin/ctdbd --recovery-daemon --nlist tests/4nodes.txt --listen=127.0.0.3 --socket=/tmp/ctdb.socket.127.0.0.3
|
||||||
bin/ctdbd --recovery-daemon --nlist direct/4nodes.txt --listen=127.0.0.4 --socket=/tmp/ctdb.socket.127.0.0.4
|
bin/ctdbd --recovery-daemon --nlist tests/4nodes.txt --listen=127.0.0.4 --socket=/tmp/ctdb.socket.127.0.0.4
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "Attaching to some databases"
|
echo "Attaching to some databases"
|
||||||
|
Loading…
Reference in New Issue
Block a user