python/setup.py | 2 +-
sanlock.spec | 2 --
src/Makefile | 20 ++++----------------
tests/devcount.c | 8 ++++++++
4 files changed, 13 insertions(+), 19 deletions(-)
New commits:
commit 39e6aa25e070d532d1ced0b74780346d028cdf93
Author: David Teigland <teigland(a)redhat.com>
Date: Tue Jun 7 11:06:32 2011 -0500
libsanlock: link with LDFLAGS
diff --git a/src/Makefile b/src/Makefile
index f020aee..93d0306 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -62,12 +62,13 @@ CFLAGS += -D_GNU_SOURCE -g \
-fdiagnostics-show-option
CMD_LDFLAGS = -lpthread -lrt -laio -lblkid -lsanlock -lwdmd
+LIB_LDFLAGS = -lpthread -lrt -laio -lblkid -lwdmd
all: $(SHLIB_TARGET) $(CMD_TARGET)
$(SHLIB_TARGET): $(LIB_SOURCE)
- $(CC) $(CFLAGS) -shared -fPIC -o $@ -Wl,-soname=$(LIB_TARGET).so.$(SOMAJOR) $^
+ $(CC) $(CFLAGS) $(LIB_LDFLAGS) -shared -fPIC -o $@
-Wl,-soname=$(LIB_TARGET).so.$(SOMAJOR) $^
ln -sf $(SHLIB_TARGET) $(LIB_TARGET).so
ln -sf $(SHLIB_TARGET) $(LIB_TARGET).so.$(SOMAJOR)
commit 108d5aeba6f1944877a93f5c2038a217a924d341
Author: Federico Simoncelli <fsimonce(a)redhat.com>
Date: Tue Jun 7 11:47:24 2011 -0400
libs: include libsanlock_direct into libsanlock
diff --git a/python/setup.py b/python/setup.py
index db36dc7..19520e5 100644
--- a/python/setup.py
+++ b/python/setup.py
@@ -6,7 +6,7 @@
from distutils.core import setup, Extension
-sanlocklib = ['sanlock', 'sanlock_direct', 'blkid', 'rt',
'aio']
+sanlocklib = ['sanlock']
sanlockmod = Extension(name = 'sanlockmod',
sources = ['sanlockmod.c'],
include_dirs = ['../src'],
diff --git a/sanlock.spec b/sanlock.spec
index c4cb013..52b1ec9 100644
--- a/sanlock.spec
+++ b/sanlock.spec
@@ -93,7 +93,6 @@ access to the shared disks.
%defattr(-,root,root,-)
%doc COPYING
%{_libdir}/libsanlock.so.*
-%{_libdir}/libsanlock_direct.so.*
%{_libdir}/libwdmd.so.*
%package python
@@ -127,7 +126,6 @@ developing applications that use %{name}.
%{_libdir}/libwdmd.so
%{_includedir}/wdmd.h
%{_libdir}/libsanlock.so
-%{_libdir}/libsanlock_direct.so
%{_includedir}/sanlock.h
%{_includedir}/sanlock_rv.h
%{_includedir}/sanlock_admin.h
diff --git a/src/Makefile b/src/Makefile
index 71283fa..f020aee 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -8,8 +8,6 @@ CMD_TARGET = sanlock
LIB_TARGET = libsanlock
-LIB2_TARGET = libsanlock_direct
-
HEADER_TARGET = sanlock.h sanlock_rv.h sanlock_resource.h sanlock_admin.h
sanlock_direct.h
SOMAJOR=1
@@ -17,8 +15,6 @@ SOMINOR=0
SHLIB_TARGET = $(LIB_TARGET).so.$(SOMAJOR).$(SOMINOR)
-SHLIB2_TARGET = $(LIB2_TARGET).so.$(SOMAJOR).$(SOMINOR)
-
CMD_SOURCE = \
crc32c.c \
delta_lease.c \
@@ -36,9 +32,7 @@ CMD_SOURCE = \
LIB_SOURCE = \
client_msg.c \
client_resource.c \
- client_admin.c
-
-LIB2_SOURCE = \
+ client_admin.c \
crc32c.c \
diskio.c \
delta_lease.c \
@@ -70,7 +64,7 @@ CFLAGS += -D_GNU_SOURCE -g \
CMD_LDFLAGS = -lpthread -lrt -laio -lblkid -lsanlock -lwdmd
-all: $(SHLIB_TARGET) $(CMD_TARGET) $(SHLIB2_TARGET)
+all: $(SHLIB_TARGET) $(CMD_TARGET)
$(SHLIB_TARGET): $(LIB_SOURCE)
$(CC) $(CFLAGS) -shared -fPIC -o $@ -Wl,-soname=$(LIB_TARGET).so.$(SOMAJOR) $^
@@ -80,11 +74,6 @@ $(SHLIB_TARGET): $(LIB_SOURCE)
$(CMD_TARGET): $(SHLIB_TARGET) $(CMD_SOURCE)
$(CC) $(CFLAGS) $(CMD_LDFLAGS) $(CMD_SOURCE) -o $@ -L. -L../wdmd
-$(SHLIB2_TARGET): $(LIB2_SOURCE)
- $(CC) $(CFLAGS) -shared -fPIC -o $@ -Wl,-soname=$(LIB2_TARGET).so.$(SOMAJOR) $^
- ln -sf $(SHLIB2_TARGET) $(LIB2_TARGET).so
- ln -sf $(SHLIB2_TARGET) $(LIB2_TARGET).so.$(SOMAJOR)
-
clean:
rm -f *.o *.so *.so.* $(CMD_TARGET)
@@ -102,7 +91,5 @@ install: all
mkdir -p $(DESTDIR)/$(HEADER_DIR)
$(INSTALL) -c -m 755 $(CMD_TARGET) $(DESTDIR)/$(CMD_BINDIR)
$(INSTALL) -c -m 755 $(SHLIB_TARGET) $(DESTDIR)/$(LIB_LIBDIR)
- $(INSTALL) -c -m 755 $(SHLIB2_TARGET) $(DESTDIR)/$(LIB_LIBDIR)
cp -a $(LIB_TARGET).so $(DESTDIR)/$(LIB_LIBDIR)
- cp -a $(LIB2_TARGET).so $(DESTDIR)/$(LIB_LIBDIR)
$(INSTALL) -c -m 644 $(HEADER_TARGET) $(DESTDIR)/$(HEADER_DIR)
commit bfa5280a5df6374090a698b5bdf8abd7ca39fdef
Author: David Teigland <teigland(a)redhat.com>
Date: Tue Jun 7 10:51:35 2011 -0500
devcount: use aio in init
diff --git a/tests/devcount.c b/tests/devcount.c
index 172eac3..ee9a9dd 100644
--- a/tests/devcount.c
+++ b/tests/devcount.c
@@ -1420,12 +1420,20 @@ int do_init(int argc, char *argv[])
strcpy(ls.name, "devcount");
strcpy(ls.host_id_disk.path, argv[2]);
+ printf("init sync\n");
rv = sanlock_direct_init(&ls, NULL, 0, INIT_NUM_HOSTS, 0);
if (rv < 0) {
printf("sanlock_direct_init lockspace error %d\n", rv);
return -1;
}
+ printf("init async\n");
+ rv = sanlock_direct_init(&ls, NULL, 0, INIT_NUM_HOSTS, 1);
+ if (rv < 0) {
+ printf("sanlock_direct_init lockspace error %d\n", rv);
+ return -1;
+ }
+
memset(resbuf, 0, sizeof(resbuf));
res = (struct sanlk_resource *)&resbuf;
strcpy(res->lockspace_name, "devcount");