Accepting request 213318 from network:ha-clustering:Factory

Updated changelog to show patches removed (forwarded request 213317 from goldwynr)

OBS-URL: https://build.opensuse.org/request/show/213318
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ocfs2-tools?expand=0&rev=54
This commit is contained in:
Stephan Kulow 2014-01-10 06:16:15 +00:00 committed by Git OBS Bridge
commit 9ed0abc20b
14 changed files with 230 additions and 919 deletions

View File

@ -0,0 +1,159 @@
From 1110d13d756406a6188299bf68db4743cf7c41a3 Mon Sep 17 00:00:00 2001
From: Goldwyn Rodrigues <rgoldwyn@suse.com>
Date: Sat, 21 Dec 2013 18:41:04 -0600
Subject: [PATCH] Use cmap for getting cluster name
---
debugfs.ocfs2/Makefile | 2 +-
libo2cb/o2cb_abi.c | 79 +++++++++++++++++++++++++++-----------------------
o2cb.pc.in | 2 +-
o2cb_ctl/Makefile | 2 +-
4 files changed, 46 insertions(+), 39 deletions(-)
diff --git a/debugfs.ocfs2/Makefile b/debugfs.ocfs2/Makefile
index ca4c9a4..30dfa5f 100644
--- a/debugfs.ocfs2/Makefile
+++ b/debugfs.ocfs2/Makefile
@@ -32,7 +32,7 @@ HFILES = \
OBJS = $(subst .c,.o,$(CFILES))
LIBOCFS2_LIBS = -L$(TOPDIR)/libocfs2 -locfs2
-LIBO2CB_LIBS = -L$(TOPDIR)/libo2cb -lo2cb
+LIBO2CB_LIBS = -L$(TOPDIR)/libo2cb -lo2cb $(DL_LIBS)
MANS = debugfs.ocfs2.8
diff --git a/libo2cb/o2cb_abi.c b/libo2cb/o2cb_abi.c
index ae03595..40f8176 100644
--- a/libo2cb/o2cb_abi.c
+++ b/libo2cb/o2cb_abi.c
@@ -35,6 +35,8 @@
#include <errno.h>
#include <limits.h>
#include <ctype.h>
+#include <dlfcn.h>
+#include <corosync/cmap.h>
#include <linux/types.h>
@@ -1966,52 +1968,57 @@ static errcode_t classic_list_clusters(char ***clusters)
static errcode_t user_list_clusters(char ***clusters)
{
- errcode_t err = O2CB_ET_SERVICE_UNAVAILABLE;
- int rc, fd = -1;
- char buf[OCFS2_CONTROLD_MAXLINE];
+ errcode_t ret = O2CB_ET_SERVICE_UNAVAILABLE;
+ void *lib_handle = NULL;
+ char **list;
+ int rv;
- rc = ocfs2_client_connect();
- if (rc < 0) {
- /* fprintf(stderr, "Unable to connect to ocfs2_controld: %s\n",
- strerror(-rc)); */
- switch (rc) {
- case -EACCES:
- case -EPERM:
- err = O2CB_ET_PERMISSION_DENIED;
- break;
+ cmap_handle_t handle;
+ static int (*initialize)(cmap_handle_t *handle);
+ static int (*get_string)(cmap_handle_t handle,
+ const char *string,
+ char **name);
+ static int (*finalize)(cmap_handle_t handle);
- default:
- err = O2CB_ET_SERVICE_UNAVAILABLE;
- break;
- }
+
+ lib_handle = dlopen("libcmap.so", RTLD_NOW | RTLD_LOCAL);
+ if (!lib_handle)
+ return ret;
+
+ initialize = dlsym(lib_handle, "cmap_initialize");
+ if (!initialize)
goto out;
- }
- fd = rc;
- rc = send_message(fd, CM_LISTCLUSTERS);
- if (rc) {
- /* fprintf(stderr,
- "Unable to send LISTCLUSTERS message: %s\n",
- strerror(-rc)); */
- err = O2CB_ET_IO;
+ get_string = dlsym(lib_handle, "cmap_get_string");
+ if (!get_string)
goto out;
- }
- rc = receive_list(fd, buf, clusters);
- if (rc) {
- /* fprintf(stderr, "Error reading from daemon: %s\n",
- strerror(-rc)); */
- err = O2CB_ET_IO;
+ finalize = dlsym(lib_handle, "cmap_finalize");
+ if (!finalize)
goto out;
- }
- err = 0;
+ rv = initialize(&handle);
+ if (rv != CS_OK)
+ goto out;
-out:
- if (fd != -1)
- close(fd);
+ list = (char **)malloc(sizeof(char *) * 2);
+ if (!list)
+ goto out;
- return err;
+ rv = get_string(handle, "totem.cluster_name", &list[0]);
+ if (rv != CS_OK) {
+ free(list);
+ ret = O2CB_ET_INTERNAL_FAILURE;
+ goto out;
+ }
+
+ list[1] = NULL;
+ *clusters = list;
+ finalize(handle);
+ ret = 0;
+out:
+ dlclose(lib_handle);
+ return ret;
}
errcode_t o2cb_list_clusters(char ***clusters)
diff --git a/o2cb.pc.in b/o2cb.pc.in
index be94b8a..f13c560 100644
--- a/o2cb.pc.in
+++ b/o2cb.pc.in
@@ -7,5 +7,5 @@ Name: o2cb
Description: Library for accessing the ocfs2 cluster base (o2cb)
Version: @VERSION@
Requires: com_err
-Libs: -L${libdir} -lo2cb
+Libs: -L${libdir} -lo2cb -ldl
Cflags: -I${includedir}
diff --git a/o2cb_ctl/Makefile b/o2cb_ctl/Makefile
index 5efcab4..8589748 100644
--- a/o2cb_ctl/Makefile
+++ b/o2cb_ctl/Makefile
@@ -13,7 +13,7 @@ LIBTOOLS_INTERNAL_DEPS = $(TOPDIR)/libtools-internal/libtools-internal.a
LIBOCFS2_LIBS = -L$(TOPDIR)/libocfs2 -locfs2
LIBOCFS2_DEPS = $(TOPDIR)/libocfs2/libocfs2.a
-LIBO2CB_LIBS = -L$(TOPDIR)/libo2cb -lo2cb
+LIBO2CB_LIBS = -L$(TOPDIR)/libo2cb -lo2cb $(DL_LIBS)
LIBO2CB_DEPS = $(TOPDIR)/libo2cb/libo2cb.a
LIBO2DLM_LIBS = -L$(TOPDIR)/libo2dlm -lo2dlm $(DL_LIBS)
--
1.8.4

View File

@ -1,19 +1,22 @@
From 2d1b78517ff14633f4b1cf4adddf6308721f9722 Mon Sep 17 00:00:00 2001
From c863784d971acd7efddc415d5140b8846799162e Mon Sep 17 00:00:00 2001
From: Goldwyn Rodrigues <rgoldwyn@suse.com>
Date: Mon, 19 Aug 2013 08:20:32 -0500
Subject: [PATCH] libo2cb: Remove controld actions from group join/leave
Date: Fri, 27 Dec 2013 09:20:52 -0600
Subject: [PATCH] Remove controld dependency in group_join/leave
---
libo2cb/o2cb_abi.c | 152 +----------------------------------------------------
1 file changed, 2 insertions(+), 150 deletions(-)
libo2cb/o2cb_abi.c | 156 +++--------------------------------------------------
1 file changed, 7 insertions(+), 149 deletions(-)
diff --git a/libo2cb/o2cb_abi.c b/libo2cb/o2cb_abi.c
index ae03595..4e689cd 100644
index 40f8176..5eca49d 100644
--- a/libo2cb/o2cb_abi.c
+++ b/libo2cb/o2cb_abi.c
@@ -1373,162 +1373,14 @@ static errcode_t user_parse_status(char **args, int *error, char **error_msg)
@@ -1373,164 +1373,22 @@ static errcode_t user_parse_status(char **args, int *error, char **error_msg)
}
static errcode_t user_begin_group_join(struct o2cb_cluster_desc *cluster,
struct o2cb_region_desc *region)
- struct o2cb_region_desc *region)
+ struct o2cb_region_desc *region)
{
- errcode_t err;
- int rc;
@ -92,15 +95,19 @@ index ae03595..4e689cd 100644
- }
-
- err = 0;
-
+ errcode_t ret = 0;
-out:
- if (err && (control_daemon_fd != -1)) {
- close(control_daemon_fd);
- control_daemon_fd = -1;
- }
-
+ ret = o2cb_validate_cluster_name(cluster);
+ if (ret)
+ return ret;
- return err;
+ return 0;
+ return ret;
}
static errcode_t user_complete_group_join(struct o2cb_cluster_desc *cluster,
@ -177,5 +184,5 @@ index ae03595..4e689cd 100644
static errcode_t user_group_leave(struct o2cb_cluster_desc *cluster,
--
1.8.1.4
1.8.4

View File

@ -1,450 +0,0 @@
From 40b1211091b62a4884d1625fc04d476a07489ca3 Mon Sep 17 00:00:00 2001
From: Goldwyn Rodrigues <rgoldwyn@suse.com>
Date: Mon, 19 Aug 2013 08:38:59 -0500
Subject: [PATCH] libo2cb: Remove rest of controld functions
---
libo2cb/o2cb_abi.c | 388 +----------------------------------------------------
1 file changed, 2 insertions(+), 386 deletions(-)
Index: ocfs2-tools-1.8.2+git.1361836695.ff84eb5/libo2cb/o2cb_abi.c
===================================================================
--- ocfs2-tools-1.8.2+git.1361836695.ff84eb5.orig/libo2cb/o2cb_abi.c 2013-10-01 11:36:42.953751354 -0500
+++ ocfs2-tools-1.8.2+git.1361836695.ff84eb5/libo2cb/o2cb_abi.c 2013-10-01 11:39:04.935088610 -0500
@@ -46,7 +46,6 @@
#define CLUSTER_STACK_FILE "/sys/fs/ocfs2/cluster_stack"
#define LOCKING_PROTOCOL_FILE "/sys/fs/ocfs2/max_locking_protocol"
#define OCFS2_STACK_LABEL_LEN 4
-#define CONTROL_DEVICE "/dev/misc/ocfs2_control"
static errcode_t o2cb_validate_cluster_name(struct o2cb_cluster_desc *desc);
static errcode_t o2cb_validate_cluster_flags(struct o2cb_cluster_desc *desc,
@@ -106,8 +105,6 @@ static struct o2cb_stack user_stack = {
};
static struct o2cb_stack *current_stack;
-static int control_daemon_fd = -1;
-static int control_device_fd = -1;
static char *configfs_path;
@@ -1349,27 +1346,6 @@ static errcode_t classic_complete_group_
return ret;
}
-static errcode_t user_parse_status(char **args, int *error, char **error_msg)
-{
- errcode_t err = O2CB_ET_IO;
- long result;
- char *ptr = NULL;
-
- result = strtol(args[0], &ptr, 10);
- if (ptr && *ptr != '\0') {
- /* fprintf(stderr, "Invalid error code string: %s", args[0]); */
- } else if ((result == LONG_MIN) || (result == LONG_MAX) ||
- (result < INT_MIN) || (result > INT_MAX)) {
- /* fprintf(stderr, "Error code %ld out of range", err); */
- } else {
- *error_msg = args[1];
- *error = result;
- err = 0;
- }
-
- return err;
-}
-
static errcode_t user_begin_group_join(struct o2cb_cluster_desc *cluster,
struct o2cb_region_desc *region)
{
@@ -1386,90 +1362,7 @@ static errcode_t user_complete_group_joi
static errcode_t user_group_leave(struct o2cb_cluster_desc *cluster,
struct o2cb_region_desc *region)
{
- errcode_t err = O2CB_ET_SERVICE_UNAVAILABLE;
- int rc;
- int error;
- char *error_msg;
- client_message message;
- char *argv[OCFS2_CONTROLD_MAXARGS + 1];
- char buf[OCFS2_CONTROLD_MAXLINE];
-
- if (control_daemon_fd != -1) {
- /* fprintf(stderr, "Join in progress!\n"); */
- err = O2CB_ET_INTERNAL_FAILURE;
- goto out;
- }
-
- rc = ocfs2_client_connect();
- if (rc < 0) {
- /* fprintf(stderr, "Unable to connect to ocfs2_controld: %s\n",
- strerror(-rc)); */
- switch (rc) {
- case -EACCES:
- case -EPERM:
- err = O2CB_ET_PERMISSION_DENIED;
- break;
-
- default:
- err = O2CB_ET_SERVICE_UNAVAILABLE;
- break;
- }
- goto out;
- }
- control_daemon_fd = rc;
-
- rc = send_message(control_daemon_fd, CM_UNMOUNT, OCFS2_FS_NAME,
- region->r_name, region->r_service);
- if (rc) {
- /* fprintf(stderr, "Unable to send UNMOUNT message: %s\n",
- strerror(-rc)); */
- err = O2CB_ET_IO;
- goto out;
- }
-
- rc = receive_message(control_daemon_fd, buf, &message, argv);
- if (rc < 0) {
- /* fprintf(stderr, "Error reading from daemon: %s\n",
- strerror(-rc)); */
- err = O2CB_ET_IO;
- goto out;
- }
-
- switch (message) {
- case CM_STATUS:
- err = user_parse_status(argv, &error, &error_msg);
- if (err) {
- /* fprintf(stderr, "Bad status message: %s\n",
- strerror(-rc)); */
- goto out;
- }
- if (error) {
- /* fprintf(stderr,
- "Error %d from daemon: %s\n",
- error, error_msg); */
- err = O2CB_ET_CONFIGURATION_ERROR;
- goto out;
- }
- break;
-
- default:
- /* fprintf(stderr,
- "Unexpected message %s from daemon\n",
- message_to_string(message)); */
- err = O2CB_ET_INTERNAL_FAILURE;
- goto out;
- break;
- }
-
- err = 0;
-
-out:
- if (control_daemon_fd != -1) {
- close(control_daemon_fd);
- control_daemon_fd = -1;
- }
-
- return err;
+ return 0;
}
static errcode_t o2cb_validate_cluster_flags(struct o2cb_cluster_desc *desc,
@@ -1818,52 +1711,7 @@ static errcode_t classic_list_clusters(c
static errcode_t user_list_clusters(char ***clusters)
{
- errcode_t err = O2CB_ET_SERVICE_UNAVAILABLE;
- int rc, fd = -1;
- char buf[OCFS2_CONTROLD_MAXLINE];
-
- rc = ocfs2_client_connect();
- if (rc < 0) {
- /* fprintf(stderr, "Unable to connect to ocfs2_controld: %s\n",
- strerror(-rc)); */
- switch (rc) {
- case -EACCES:
- case -EPERM:
- err = O2CB_ET_PERMISSION_DENIED;
- break;
-
- default:
- err = O2CB_ET_SERVICE_UNAVAILABLE;
- break;
- }
- goto out;
- }
- fd = rc;
-
- rc = send_message(fd, CM_LISTCLUSTERS);
- if (rc) {
- /* fprintf(stderr,
- "Unable to send LISTCLUSTERS message: %s\n",
- strerror(-rc)); */
- err = O2CB_ET_IO;
- goto out;
- }
-
- rc = receive_list(fd, buf, clusters);
- if (rc) {
- /* fprintf(stderr, "Error reading from daemon: %s\n",
- strerror(-rc)); */
- err = O2CB_ET_IO;
- goto out;
- }
-
- err = 0;
-
-out:
- if (fd != -1)
- close(fd);
-
- return err;
+ return 0;
}
errcode_t o2cb_list_clusters(char ***clusters)
@@ -1991,83 +1839,6 @@ errcode_t o2cb_set_heartbeat_mode(char *
return ret;
}
-static errcode_t dump_list_to_string(char **dump_list, char **debug)
-{
- int i;
- size_t len, count = 0;
- char *ptr;
-
- for (i = 0; dump_list[i]; i++)
- count += strlen(dump_list[i]);
-
- *debug = malloc(sizeof(char) * (count + 1));
- if (!*debug)
- return O2CB_ET_NO_MEMORY;
-
- ptr = *debug;
- ptr[count] = '\0';
- for (i = 0; dump_list[i]; i++) {
- len = strlen(dump_list[i]);
- memcpy(ptr, dump_list[i], len);
- ptr += len;
- }
-
- return 0;
-}
-
-errcode_t o2cb_control_daemon_debug(char **debug)
-{
- errcode_t err = O2CB_ET_SERVICE_UNAVAILABLE;
- int rc, fd = -1;
- char buf[OCFS2_CONTROLD_MAXLINE];
- char **dump_list = NULL;
-
- rc = ocfs2_client_connect();
- if (rc < 0) {
- /* fprintf(stderr, "Unable to connect to ocfs2_controld: %s\n",
- strerror(-rc)); */
- switch (rc) {
- case -EACCES:
- case -EPERM:
- err = O2CB_ET_PERMISSION_DENIED;
- break;
-
- default:
- err = O2CB_ET_SERVICE_UNAVAILABLE;
- break;
- }
- goto out;
- }
- fd = rc;
-
- rc = send_message(fd, CM_DUMP);
- if (rc) {
- /* fprintf(stderr,
- "Unable to send DUMP message: %s\n",
- strerror(-rc)); */
- err = O2CB_ET_IO;
- goto out;
- }
-
- rc = receive_list(fd, buf, &dump_list);
- if (rc) {
- /* fprintf(stderr, "Error reading from daemon: %s\n",
- strerror(-rc)); */
- err = O2CB_ET_IO;
- goto out;
- }
-
- err = dump_list_to_string(dump_list, debug);
- o2cb_free_dir_list(dump_list);
-
-out:
- if (fd != -1)
- close(fd);
-
- return err;
-}
-
-
errcode_t o2cb_get_hb_thread_pid (const char *cluster_name, const char *region_name,
pid_t *pid)
{
@@ -2171,161 +1942,6 @@ errcode_t o2cb_get_node_local(const char
return 0;
}
-/*
- * The handshake is pretty simple. We need to read all supported control
- * device protocols from the kernel. Once we've read them, we can write
- * the protocol we want to use. After that, we're good to go.
- *
- * Right now, we will just allow the T01 protocol and not write any
- * code to handle multiples. We'll add that later if and when it is
- * necessary.
- *
- * The versions read from the kernel are all 4 characers including the
- * newline.
- */
-#define OCFS2_CONTROL_PROTO "T01\n"
-#define OCFS2_CONTROL_PROTO_LEN 4
-#define OCFS2_CONTROL_MESSAGE_SETNODE_OP "SETN"
-#define OCFS2_CONTROL_MESSAGE_SETNODE_TOTAL_LEN 14
-#define OCFS2_CONTROL_MESSAGE_SETVERSION_OP "SETV"
-#define OCFS2_CONTROL_MESSAGE_SETVERSION_TOTAL_LEN 11
-#define OCFS2_CONTROL_MESSAGE_DOWN_OP "DOWN"
-#define OCFS2_CONTROL_MESSAGE_DOWN_TOTAL_LEN 47
-#define OCFS2_CONTROL_MESSAGE_NODENUM_LEN 8
-static errcode_t o2cb_control_handshake(unsigned int this_node,
- struct ocfs2_protocol_version *proto)
-{
- errcode_t err = 0;
- int found = 0;
- size_t ret;
- char buf[OCFS2_CONTROL_MESSAGE_SETNODE_TOTAL_LEN + 1];
-
- if (control_device_fd == -1) {
- err = O2CB_ET_INTERNAL_FAILURE;
- goto out;
- }
-
- buf[OCFS2_CONTROL_PROTO_LEN] = '\0';
- while (1)
- {
- ret = read(control_device_fd, buf, OCFS2_CONTROL_PROTO_LEN);
- if (ret == OCFS2_CONTROL_PROTO_LEN) {
- if (!found && !strcmp(buf,
- OCFS2_CONTROL_PROTO))
- found = 1;
- continue;
- }
-
- if (ret != 0)
- err = O2CB_ET_IO;
- else if (!found)
- err = O2CB_ET_SERVICE_HANDSHAKE_UNAVAILABLE; /* no match */
- break;
- }
-
- if (err)
- goto out;
-
- ret = write(control_device_fd, OCFS2_CONTROL_PROTO,
- OCFS2_CONTROL_PROTO_LEN);
- if (ret != OCFS2_CONTROL_PROTO_LEN) {
- err = O2CB_ET_IO;
- goto out;
- }
-
- snprintf(buf, OCFS2_CONTROL_MESSAGE_SETNODE_TOTAL_LEN + 1,
- OCFS2_CONTROL_MESSAGE_SETNODE_OP " %08X\n", this_node);
- ret = write(control_device_fd, buf,
- OCFS2_CONTROL_MESSAGE_SETNODE_TOTAL_LEN);
- if (ret != OCFS2_CONTROL_MESSAGE_SETNODE_TOTAL_LEN)
- err = O2CB_ET_IO;
-
- snprintf(buf, OCFS2_CONTROL_MESSAGE_SETVERSION_TOTAL_LEN + 1,
- OCFS2_CONTROL_MESSAGE_SETVERSION_OP " %02X %02X\n",
- proto->pv_major, proto->pv_minor);
- ret = write(control_device_fd, buf,
- OCFS2_CONTROL_MESSAGE_SETVERSION_TOTAL_LEN);
- if (ret != OCFS2_CONTROL_MESSAGE_SETVERSION_TOTAL_LEN)
- err = O2CB_ET_IO;
-
-out:
- return err;
-}
-
-errcode_t o2cb_control_open(unsigned int this_node,
- struct ocfs2_protocol_version *proto)
-{
- errcode_t err = 0;
- int rc;
-
- if (!current_stack) {
- err = O2CB_ET_SERVICE_UNAVAILABLE;
- goto out;
- }
-
- if (control_device_fd != -1)
- goto out;
-
- rc = open(CONTROL_DEVICE, O_RDWR);
- if (rc < 0) {
- switch (errno) {
- default:
- err = O2CB_ET_INTERNAL_FAILURE;
- break;
-
- case ENOTDIR:
- case ENOENT:
- case EISDIR:
- err = O2CB_ET_SERVICE_DEV_UNAVAILABLE;
- break;
-
- case EACCES:
- case EPERM:
- case EROFS:
- err = O2CB_ET_PERMISSION_DENIED;
- break;
- }
- goto out;
- }
-
- control_device_fd = rc;
-
- err = o2cb_control_handshake(this_node, proto);
- if (err) {
- close(control_device_fd);
- control_device_fd = -1;
- }
-
-out:
- return err;
-}
-
-void o2cb_control_close(void)
-{
- if (control_device_fd != -1) {
- close(control_device_fd);
- control_device_fd = -1;
- }
-}
-
-errcode_t o2cb_control_node_down(const char *uuid, unsigned int nodeid)
-{
- errcode_t err = 0;
- size_t ret;
- char buf[OCFS2_CONTROL_MESSAGE_DOWN_TOTAL_LEN + 1];
-
- if (control_device_fd == -1)
- return O2CB_ET_INTERNAL_FAILURE;
-
- snprintf(buf, OCFS2_CONTROL_MESSAGE_DOWN_TOTAL_LEN + 1,
- "DOWN %.32s %08X\n", uuid, nodeid);
- ret = write(control_device_fd, buf,
- OCFS2_CONTROL_MESSAGE_DOWN_TOTAL_LEN);
- if (ret != OCFS2_CONTROL_MESSAGE_DOWN_TOTAL_LEN)
- err = O2CB_ET_IO;
-
- return err;
-}
errcode_t o2cb_get_hb_ctl_path(char *buf, int count)
{

View File

@ -1,15 +1,19 @@
From 5d0bffdbbadd38173a9bfbf4ffb8d455b5f0b990 Mon Sep 17 00:00:00 2001
From 4b99b5a6042fe9b33079df64ab13817a309de528 Mon Sep 17 00:00:00 2001
From: Goldwyn Rodrigues <rgoldwyn@suse.com>
Date: Tue, 3 Sep 2013 07:40:39 -0500
Subject: [PATCH] mount.ocfs2: Read stack from device and setup stack if not
present
Date: Fri, 27 Dec 2013 09:52:09 -0600
Subject: [PATCH] Auto setup cluster_stack based on what is on disk
Note, this removes cman as the possible user stack.
This happens only the first time.
mount.ocfs2 reads the stack from the filesystems superblock. If the
stack is not setup, it will modprobe the modules and write the
appropriate stack name to cluster_stack file.
If it is already present, it tries to edit/re-write it, if different.
If it fails, the mount fails.
---
include/o2cb/o2cb.h | 1 +
libo2cb/o2cb_abi.c | 103 ++++++++++++++++++++++++++++++++++++++++++++++
libo2cb/o2cb_abi.c | 104 ++++++++++++++++++++++++++++++++++++++++++++++
mount.ocfs2/mount.ocfs2.c | 6 +++
3 files changed, 110 insertions(+)
3 files changed, 111 insertions(+)
diff --git a/include/o2cb/o2cb.h b/include/o2cb/o2cb.h
index d512cf9..5ef9754 100644
@ -23,7 +27,7 @@ index d512cf9..5ef9754 100644
#endif /* _O2CB_H */
diff --git a/libo2cb/o2cb_abi.c b/libo2cb/o2cb_abi.c
index 26ed848..6d1e41a 100644
index 5eca49d..c751abf 100644
--- a/libo2cb/o2cb_abi.c
+++ b/libo2cb/o2cb_abi.c
@@ -29,6 +29,7 @@
@ -34,15 +38,7 @@ index 26ed848..6d1e41a 100644
#include <dirent.h>
#include <fcntl.h>
#include <unistd.h>
@@ -103,6 +104,7 @@ static struct o2cb_stack_ops user_ops = {
.group_leave = user_group_leave,
};
static struct o2cb_stack user_stack = {
+ .s_name = "pcmk",
.s_ops = &user_ops,
};
@@ -142,6 +144,22 @@ static ssize_t read_single_line_file(const char *file, char *line,
@@ -145,6 +146,22 @@ static ssize_t read_single_line_file(const char *file, char *line,
return ret;
}
@ -65,7 +61,7 @@ index 26ed848..6d1e41a 100644
static ssize_t read_stack_file(char *line, size_t count)
{
return read_single_line_file(CLUSTER_STACK_FILE, line, count);
@@ -2017,3 +2035,88 @@ errcode_t o2cb_get_hb_ctl_path(char *buf, int count)
@@ -2383,3 +2400,90 @@ errcode_t o2cb_get_hb_ctl_path(char *buf, int count)
return 0;
}
@ -132,15 +128,17 @@ index 26ed848..6d1e41a 100644
+ } else if (len == -ENOENT) {
+ if (!modprobe_performed) {
+ perform_modprobe("ocfs2");
+ if (!strncmp(stack_name, user_stack.s_name,
+ OCFS2_STACK_LABEL_LEN))
+ if ((!strncmp(stack_name, OCFS2_PCMK_CLUSTER_STACK,
+ OCFS2_STACK_LABEL_LEN)) ||
+ (!strncmp(stack_name, OCFS2_CMAN_CLUSTER_STACK,
+ OCFS2_STACK_LABEL_LEN)))
+ perform_modprobe(USER_KERNEL_MODULE);
+ else if (!strncmp(stack_name, classic_stack.s_name,
+ OCFS2_STACK_LABEL_LEN))
+ perform_modprobe(O2CB_KERNEL_MODULE);
+
+ write_single_line_file(CLUSTER_STACK_FILE, stack_name,
+ strlen(stack_name));
+ OCFS2_STACK_LABEL_LEN);
+ write_performed = 1;
+ goto redo;
+ } else
@ -172,5 +170,5 @@ index f2ca5cb..c009d82 100644
ret = o2cb_init();
if (ret) {
--
1.8.1.4
1.8.4

View File

@ -1,62 +0,0 @@
From 3f2b73105c5e09e17744ec249eed93c60124bd2d Mon Sep 17 00:00:00 2001
From: Goldwyn Rodrigues <rgoldwyn@suse.com>
Date: Mon, 19 Aug 2013 18:05:04 -0500
Subject: [PATCH] Get cluster name from corosync cmap
---
libo2cb/o2cb_abi.c | 20 ++++++++++++++++++++
o2cb.pc.in | 2 +-
2 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/libo2cb/o2cb_abi.c b/libo2cb/o2cb_abi.c
index 8e5d6ce..d00dd46 100644
--- a/libo2cb/o2cb_abi.c
+++ b/libo2cb/o2cb_abi.c
@@ -37,6 +37,7 @@
#include <ctype.h>
#include <linux/types.h>
+#include <corosync/cmap.h>
#include "o2cb/o2cb.h"
#include "o2cb/o2cb_client_proto.h"
@@ -1711,6 +1712,25 @@ static errcode_t classic_list_clusters(char ***clusters)
static errcode_t user_list_clusters(char ***clusters)
{
+ cmap_handle_t handle;
+ char **list;
+ int rv;
+
+ rv = cmap_initialize(&handle);
+ if (rv != CS_OK)
+ return O2CB_ET_SERVICE_UNAVAILABLE;
+
+ /* We supply only one cluster_name */
+ list = (char **)malloc(sizeof(char *) * 2);
+ rv = cmap_get_string(handle, "totem.cluster_name", &list[0]);
+ if (rv != CS_OK) {
+ free(list);
+ return O2CB_ET_INTERNAL_FAILURE;
+ }
+
+ list[1] = NULL;
+ *clusters = list;
+
return 0;
}
diff --git a/o2cb.pc.in b/o2cb.pc.in
index be94b8a..3a47c36 100644
--- a/o2cb.pc.in
+++ b/o2cb.pc.in
@@ -7,5 +7,5 @@ Name: o2cb
Description: Library for accessing the ocfs2 cluster base (o2cb)
Version: @VERSION@
Requires: com_err
-Libs: -L${libdir} -lo2cb
+Libs: -L${libdir} -lo2cb -lcmap
Cflags: -I${includedir}
--
1.8.1.4

View File

@ -1,64 +0,0 @@
From 394a3e7d2758331ba8aa6fc38957611d2447a73d Mon Sep 17 00:00:00 2001
From: Goldwyn Rodrigues <rgoldwyn@suse.com>
Date: Mon, 19 Aug 2013 19:15:53 -0500
Subject: [PATCH] Remove controld structures from debugfs.ocfs2
---
debugfs.ocfs2/commands.c | 34 ----------------------------------
1 file changed, 34 deletions(-)
diff --git a/debugfs.ocfs2/commands.c b/debugfs.ocfs2/commands.c
index e0b228a..c1c7589 100644
--- a/debugfs.ocfs2/commands.c
+++ b/debugfs.ocfs2/commands.c
@@ -108,11 +108,6 @@ static struct command commands[] = {
"close",
"Close a device",
},
- { "controld",
- do_controld,
- "controld dump",
- "Obtain information from ocfs2_controld",
- },
{ "curdev",
do_curdev,
"curdev",
@@ -894,35 +889,6 @@ static void do_lcd(char **args)
return ;
}
-static void do_controld_dump(char **args)
-{
- FILE *out;
- errcode_t ret;
- char *debug_buffer;
-
- ret = o2cb_control_daemon_debug(&debug_buffer);
- if (ret) {
- com_err(args[0], ret, "while obtaining the debug buffer");
- return;
- }
-
- out = open_pager(gbls.interactive);
- fprintf(out, "%s", debug_buffer);
- close_pager(out);
- free(debug_buffer);
-}
-
-static void do_controld(char **args)
-{
- if (!args[1])
- fprintf(stderr, "%s: Operation required\n", args[0]);
- else if (!strcmp(args[1], "dump"))
- do_controld_dump(args);
- else
- fprintf(stderr, "%s: Invalid operation: \"%s\"\n",
- args[0], args[1]);
-}
-
static void do_curdev(char **args)
{
printf("%s\n", gbls.device ? gbls.device : "No device");
--
1.8.1.4

View File

@ -1,6 +1,6 @@
From 14c5f3788b047024390c1a1ae40a0585417ed0d9 Mon Sep 17 00:00:00 2001
From f7ea242d2bf76c71cfe7fd9555d44c2486610486 Mon Sep 17 00:00:00 2001
From: Goldwyn Rodrigues <rgoldwyn@suse.com>
Date: Wed, 4 Sep 2013 23:56:39 -0500
Date: Fri, 27 Dec 2013 10:01:33 -0600
Subject: [PATCH] mkfs.ocfs2: Abort if cluster information is not detected
---
@ -82,5 +82,5 @@ index 13b4fb5..ca2004c 100644
int ocfs2_fill_cluster_information(State *s);
int ocfs2_check_volume(State *s);
--
1.8.1.4
1.8.4

View File

@ -1,44 +0,0 @@
From 8563d603b7af2a32ef1e19337eaeb9d7cace730c Mon Sep 17 00:00:00 2001
From: Goldwyn Rodrigues <rgoldwyn@suse.com>
Date: Mon, 19 Aug 2013 19:18:40 -0500
Subject: [PATCH] Check for DLM kernel version in user_begin_group_join
Since we just have to check if the DLM daemon is running, we
just check the kernel version running. Checking the kernel version
ensures that the dlm daemon is running.
---
libo2cb/o2cb_abi.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/libo2cb/o2cb_abi.c b/libo2cb/o2cb_abi.c
index d00dd46..26ed848 100644
--- a/libo2cb/o2cb_abi.c
+++ b/libo2cb/o2cb_abi.c
@@ -38,6 +38,7 @@
#include <linux/types.h>
#include <corosync/cmap.h>
+#include <libdlm.h>
#include "o2cb/o2cb.h"
#include "o2cb/o2cb_client_proto.h"
@@ -1350,6 +1351,16 @@ static errcode_t classic_complete_group_join(struct o2cb_cluster_desc *cluster,
static errcode_t user_begin_group_join(struct o2cb_cluster_desc *cluster,
struct o2cb_region_desc *region)
{
+ uint32_t maj, min, pat;
+ int rv;
+
+ rv = dlm_kernel_version(&maj, &min, &pat);
+
+ if (rv < 0)
+ return O2CB_ET_SERVICE_UNAVAILABLE;
+
+ if (maj < 6)
+ return O2CB_ET_INTERNAL_FAILURE;
return 0;
}
--
1.8.1.4

View File

@ -1,6 +1,6 @@
From 007b8d8d784a4108d5bde3cf1d0f1289a73957fd Mon Sep 17 00:00:00 2001
From 8d9ac69db21d36c6e05a58a38da1091bbb70956d Mon Sep 17 00:00:00 2001
From: Goldwyn Rodrigues <rgoldwyn@suse.com>
Date: Tue, 1 Oct 2013 09:39:17 -0500
Date: Fri, 27 Dec 2013 10:05:23 -0600
Subject: [PATCH] mkfs: Setup cluster_stack if not setup based on what is set
---
@ -28,5 +28,5 @@ index 75f0e7b..865dcc3 100644
if (ret) {
com_err(s->progname, ret,
--
1.8.1.4
1.8.4

View File

@ -1,121 +0,0 @@
From 4adc4d242f3f69808e7e2bed71337ff7e7966846 Mon Sep 17 00:00:00 2001
From: Goldwyn Rodrigues <rgoldwyn@suse.com>
Date: Mon, 19 Aug 2013 19:20:19 -0500
Subject: [PATCH] Add cmap and dlm libraries in the tools
---
fsck.ocfs2/Makefile | 2 +-
mkfs.ocfs2/Makefile | 2 +-
mount.ocfs2/Makefile | 2 +-
mounted.ocfs2/Makefile | 2 +-
o2cb.pc.in | 2 +-
o2cb_ctl/Makefile | 2 +-
ocfs2_hb_ctl/Makefile | 2 +-
tunefs.ocfs2/Makefile | 2 +-
8 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/fsck.ocfs2/Makefile b/fsck.ocfs2/Makefile
index edc8dc5..d1c71f8 100644
--- a/fsck.ocfs2/Makefile
+++ b/fsck.ocfs2/Makefile
@@ -12,7 +12,7 @@ LIBOCFS2_LIBS = -L$(TOPDIR)/libocfs2 -locfs2
LIBOCFS2_DEPS = $(TOPDIR)/libocfs2/libocfs2.a
LIBO2DLM_LIBS = -L$(TOPDIR)/libo2dlm -lo2dlm $(DL_LIBS)
LIBO2DLM_DEPS = $(TOPDIR)/libo2dlm/libo2dlm.a
-LIBO2CB_LIBS = -L$(TOPDIR)/libo2cb -lo2cb
+LIBO2CB_LIBS = -L$(TOPDIR)/libo2cb -lo2cb -lcmap -ldlm
LIBO2CB_DEPS = $(TOPDIR)/libo2cb/libo2cb.a
LIBTOOLS_INTERNAL_LIBS = -L$(TOPDIR)/libtools-internal -ltools-internal
LIBTOOLS_INTERNAL_DEPS = $(TOPDIR)/libtools-internal/libtools-internal.a
diff --git a/mkfs.ocfs2/Makefile b/mkfs.ocfs2/Makefile
index 5631e01..1fed073 100644
--- a/mkfs.ocfs2/Makefile
+++ b/mkfs.ocfs2/Makefile
@@ -8,7 +8,7 @@ SBIN_PROGRAMS = mkfs.ocfs2
LIBOCFS2_LIBS = -L$(TOPDIR)/libocfs2 -locfs2
LIBOCFS2_DEPS = $(TOPDIR)/libocfs2/libocfs2.a
-LIBO2CB_LIBS = -L$(TOPDIR)/libo2cb -lo2cb
+LIBO2CB_LIBS = -L$(TOPDIR)/libo2cb -lo2cb -lcmap -ldlm
LIBO2CB_DEPS = $(TOPDIR)/libo2cb/libo2cb.a
LIBO2DLM_LIBS = -L$(TOPDIR)/libo2dlm -lo2dlm $(DL_LIBS)
diff --git a/mount.ocfs2/Makefile b/mount.ocfs2/Makefile
index cf316bf..2736f5f 100644
--- a/mount.ocfs2/Makefile
+++ b/mount.ocfs2/Makefile
@@ -10,7 +10,7 @@ LIBOCFS2_LIBS = -L$(TOPDIR)/libocfs2 -locfs2
LIBOCFS2_DEPS = $(TOPDIR)/libocfs2/libocfs2.a
LIBO2DLM_LIBS = -L$(TOPDIR)/libo2dlm -lo2dlm $(DL_LIBS)
LIBO2DLM_DEPS = $(TOPDIR)/libo2dlm/libo2dlm.a
-LIBO2CB_LIBS = -L$(TOPDIR)/libo2cb -lo2cb
+LIBO2CB_LIBS = -L$(TOPDIR)/libo2cb -lo2cb -ldlm -lcmap
LIBO2CB_DEPS = $(TOPDIR)/libo2cb/libo2cb.a
DEFINES = -DVERSION=\"$(VERSION)\"
diff --git a/mounted.ocfs2/Makefile b/mounted.ocfs2/Makefile
index 8a574fb..3e18895 100644
--- a/mounted.ocfs2/Makefile
+++ b/mounted.ocfs2/Makefile
@@ -8,7 +8,7 @@ LIBOCFS2_DEPS = $(TOPDIR)/libocfs2/libocfs2.a
LIBO2DLM_LIBS = -L$(TOPDIR)/libo2dlm -lo2dlm $(DL_LIBS)
LIBO2DLM_DEPS = $(TOPDIR)/libo2dlm/libo2dlm.a
-LIBO2CB_LIBS = -L$(TOPDIR)/libo2cb -lo2cb
+LIBO2CB_LIBS = -L$(TOPDIR)/libo2cb -lo2cb -ldlm -lcmap
LIBO2CB_DEPS = $(TOPDIR)/libo2cb/libo2cb.a
LIBTOOLS_INTERNAL_LIBS = -L$(TOPDIR)/libtools-internal -ltools-internal
diff --git a/o2cb.pc.in b/o2cb.pc.in
index 3a47c36..3dd1f4e 100644
--- a/o2cb.pc.in
+++ b/o2cb.pc.in
@@ -7,5 +7,5 @@ Name: o2cb
Description: Library for accessing the ocfs2 cluster base (o2cb)
Version: @VERSION@
Requires: com_err
-Libs: -L${libdir} -lo2cb -lcmap
+Libs: -L${libdir} -lo2cb -lcmap -ldlm
Cflags: -I${includedir}
diff --git a/o2cb_ctl/Makefile b/o2cb_ctl/Makefile
index 5efcab4..0da22dc 100644
--- a/o2cb_ctl/Makefile
+++ b/o2cb_ctl/Makefile
@@ -13,7 +13,7 @@ LIBTOOLS_INTERNAL_DEPS = $(TOPDIR)/libtools-internal/libtools-internal.a
LIBOCFS2_LIBS = -L$(TOPDIR)/libocfs2 -locfs2
LIBOCFS2_DEPS = $(TOPDIR)/libocfs2/libocfs2.a
-LIBO2CB_LIBS = -L$(TOPDIR)/libo2cb -lo2cb
+LIBO2CB_LIBS = -L$(TOPDIR)/libo2cb -lo2cb -ldlm -lcmap
LIBO2CB_DEPS = $(TOPDIR)/libo2cb/libo2cb.a
LIBO2DLM_LIBS = -L$(TOPDIR)/libo2dlm -lo2dlm $(DL_LIBS)
diff --git a/ocfs2_hb_ctl/Makefile b/ocfs2_hb_ctl/Makefile
index 10fd8b1..d04e74e 100644
--- a/ocfs2_hb_ctl/Makefile
+++ b/ocfs2_hb_ctl/Makefile
@@ -10,7 +10,7 @@ LIBOCFS2_LIBS = -L$(TOPDIR)/libocfs2 -locfs2
LIBOCFS2_DEPS = $(TOPDIR)/libocfs2/libocfs2.a
LIBO2DLM_LIBS = -L$(TOPDIR)/libo2dlm -lo2dlm $(DL_LIBS)
LIBO2DLM_DEPS = $(TOPDIR)/libo2dlm/libo2dlm.a
-LIBO2CB_LIBS = -L$(TOPDIR)/libo2cb -lo2cb
+LIBO2CB_LIBS = -L$(TOPDIR)/libo2cb -lo2cb -ldlm -lcmap
LIBO2CB_DEPS = $(TOPDIR)/libo2cb/libo2cb.a
ifndef OCFS2_DYNAMIC_CTL
diff --git a/tunefs.ocfs2/Makefile b/tunefs.ocfs2/Makefile
index 585a68c..4e40d7d 100644
--- a/tunefs.ocfs2/Makefile
+++ b/tunefs.ocfs2/Makefile
@@ -11,7 +11,7 @@ LIBOCFS2_DEPS = $(TOPDIR)/libocfs2/libocfs2.a
LIBO2DLM_LIBS = -L$(TOPDIR)/libo2dlm -lo2dlm $(DL_LIBS)
LIBO2DLM_DEPS = $(TOPDIR)/libo2dlm/libo2dlm.a
-LIBO2CB_LIBS = -L$(TOPDIR)/libo2cb -lo2cb
+LIBO2CB_LIBS = -L$(TOPDIR)/libo2cb -lo2cb -ldlm -lcmap
LIBO2CB_DEPS = $(TOPDIR)/libo2cb/libo2cb.a
UNINST_LIBRARIES = libocfs2ne.a
--
1.8.1.4

View File

@ -1,25 +0,0 @@
From a1f08ff644b53da04f5cd450476ae3db6bc14583 Mon Sep 17 00:00:00 2001
From: Goldwyn Rodrigues <rgoldwyn@suse.com>
Date: Mon, 2 Sep 2013 11:15:31 -0500
Subject: [PATCH] Use libdlm_lt.so.3 instead of libdlm_lt.so
---
libo2dlm/o2dlm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libo2dlm/o2dlm.c b/libo2dlm/o2dlm.c
index dbc642b..9899694 100644
--- a/libo2dlm/o2dlm.c
+++ b/libo2dlm/o2dlm.c
@@ -802,7 +802,7 @@ static errcode_t load_fsdlm(struct o2dlm_ctxt *ctxt)
goto out;
}
- ctxt->ct_lib_handle = dlopen("libdlm_lt.so",
+ ctxt->ct_lib_handle = dlopen("libdlm_lt.so.3",
RTLD_NOW | RTLD_LOCAL);
if (!ctxt->ct_lib_handle)
goto out;
--
1.8.1.4

View File

@ -1,97 +0,0 @@
From 86a0abd01111e80803218cdae3348d2563fa2c1b Mon Sep 17 00:00:00 2001
From: Lidong Zhong <lzhong@suse.com>
Date: Tue, 1 Oct 2013 09:48:27 -0500
Subject: [PATCH] Use dlm_lt instead of dlm for DLM libraries
References: bnc#838705
Signed-off-by: Lidong Zhong <lzhong@suse.com>
---
fsck.ocfs2/Makefile | 2 +-
mkfs.ocfs2/Makefile | 2 +-
mount.ocfs2/Makefile | 2 +-
mounted.ocfs2/Makefile | 2 +-
ocfs2_hb_ctl/Makefile | 2 +-
tunefs.ocfs2/Makefile | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/fsck.ocfs2/Makefile b/fsck.ocfs2/Makefile
index d1c71f8..e3032fa 100644
--- a/fsck.ocfs2/Makefile
+++ b/fsck.ocfs2/Makefile
@@ -12,7 +12,7 @@ LIBOCFS2_LIBS = -L$(TOPDIR)/libocfs2 -locfs2
LIBOCFS2_DEPS = $(TOPDIR)/libocfs2/libocfs2.a
LIBO2DLM_LIBS = -L$(TOPDIR)/libo2dlm -lo2dlm $(DL_LIBS)
LIBO2DLM_DEPS = $(TOPDIR)/libo2dlm/libo2dlm.a
-LIBO2CB_LIBS = -L$(TOPDIR)/libo2cb -lo2cb -lcmap -ldlm
+LIBO2CB_LIBS = -L$(TOPDIR)/libo2cb -lo2cb -lcmap -ldlm_lt
LIBO2CB_DEPS = $(TOPDIR)/libo2cb/libo2cb.a
LIBTOOLS_INTERNAL_LIBS = -L$(TOPDIR)/libtools-internal -ltools-internal
LIBTOOLS_INTERNAL_DEPS = $(TOPDIR)/libtools-internal/libtools-internal.a
diff --git a/mkfs.ocfs2/Makefile b/mkfs.ocfs2/Makefile
index 1fed073..6840102 100644
--- a/mkfs.ocfs2/Makefile
+++ b/mkfs.ocfs2/Makefile
@@ -8,7 +8,7 @@ SBIN_PROGRAMS = mkfs.ocfs2
LIBOCFS2_LIBS = -L$(TOPDIR)/libocfs2 -locfs2
LIBOCFS2_DEPS = $(TOPDIR)/libocfs2/libocfs2.a
-LIBO2CB_LIBS = -L$(TOPDIR)/libo2cb -lo2cb -lcmap -ldlm
+LIBO2CB_LIBS = -L$(TOPDIR)/libo2cb -lo2cb -lcmap -ldlm_lt
LIBO2CB_DEPS = $(TOPDIR)/libo2cb/libo2cb.a
LIBO2DLM_LIBS = -L$(TOPDIR)/libo2dlm -lo2dlm $(DL_LIBS)
diff --git a/mount.ocfs2/Makefile b/mount.ocfs2/Makefile
index 2736f5f..e42958e 100644
--- a/mount.ocfs2/Makefile
+++ b/mount.ocfs2/Makefile
@@ -10,7 +10,7 @@ LIBOCFS2_LIBS = -L$(TOPDIR)/libocfs2 -locfs2
LIBOCFS2_DEPS = $(TOPDIR)/libocfs2/libocfs2.a
LIBO2DLM_LIBS = -L$(TOPDIR)/libo2dlm -lo2dlm $(DL_LIBS)
LIBO2DLM_DEPS = $(TOPDIR)/libo2dlm/libo2dlm.a
-LIBO2CB_LIBS = -L$(TOPDIR)/libo2cb -lo2cb -ldlm -lcmap
+LIBO2CB_LIBS = -L$(TOPDIR)/libo2cb -lo2cb -ldlm_lt -lcmap
LIBO2CB_DEPS = $(TOPDIR)/libo2cb/libo2cb.a
DEFINES = -DVERSION=\"$(VERSION)\"
diff --git a/mounted.ocfs2/Makefile b/mounted.ocfs2/Makefile
index 3e18895..577216e 100644
--- a/mounted.ocfs2/Makefile
+++ b/mounted.ocfs2/Makefile
@@ -8,7 +8,7 @@ LIBOCFS2_DEPS = $(TOPDIR)/libocfs2/libocfs2.a
LIBO2DLM_LIBS = -L$(TOPDIR)/libo2dlm -lo2dlm $(DL_LIBS)
LIBO2DLM_DEPS = $(TOPDIR)/libo2dlm/libo2dlm.a
-LIBO2CB_LIBS = -L$(TOPDIR)/libo2cb -lo2cb -ldlm -lcmap
+LIBO2CB_LIBS = -L$(TOPDIR)/libo2cb -lo2cb -ldlm_lt -lcmap
LIBO2CB_DEPS = $(TOPDIR)/libo2cb/libo2cb.a
LIBTOOLS_INTERNAL_LIBS = -L$(TOPDIR)/libtools-internal -ltools-internal
diff --git a/ocfs2_hb_ctl/Makefile b/ocfs2_hb_ctl/Makefile
index d04e74e..bd0ec9f 100644
--- a/ocfs2_hb_ctl/Makefile
+++ b/ocfs2_hb_ctl/Makefile
@@ -10,7 +10,7 @@ LIBOCFS2_LIBS = -L$(TOPDIR)/libocfs2 -locfs2
LIBOCFS2_DEPS = $(TOPDIR)/libocfs2/libocfs2.a
LIBO2DLM_LIBS = -L$(TOPDIR)/libo2dlm -lo2dlm $(DL_LIBS)
LIBO2DLM_DEPS = $(TOPDIR)/libo2dlm/libo2dlm.a
-LIBO2CB_LIBS = -L$(TOPDIR)/libo2cb -lo2cb -ldlm -lcmap
+LIBO2CB_LIBS = -L$(TOPDIR)/libo2cb -lo2cb -ldlm_lt -lcmap
LIBO2CB_DEPS = $(TOPDIR)/libo2cb/libo2cb.a
ifndef OCFS2_DYNAMIC_CTL
diff --git a/tunefs.ocfs2/Makefile b/tunefs.ocfs2/Makefile
index 4e40d7d..332cfb0 100644
--- a/tunefs.ocfs2/Makefile
+++ b/tunefs.ocfs2/Makefile
@@ -11,7 +11,7 @@ LIBOCFS2_DEPS = $(TOPDIR)/libocfs2/libocfs2.a
LIBO2DLM_LIBS = -L$(TOPDIR)/libo2dlm -lo2dlm $(DL_LIBS)
LIBO2DLM_DEPS = $(TOPDIR)/libo2dlm/libo2dlm.a
-LIBO2CB_LIBS = -L$(TOPDIR)/libo2cb -lo2cb -ldlm -lcmap
+LIBO2CB_LIBS = -L$(TOPDIR)/libo2cb -lo2cb -ldlm_lt -lcmap
LIBO2CB_DEPS = $(TOPDIR)/libo2cb/libo2cb.a
UNINST_LIBRARIES = libocfs2ne.a
--
1.8.1.4

View File

@ -1,3 +1,23 @@
-------------------------------------------------------------------
Fri Dec 27 17:56:21 UTC 2013 - rgoldwyn@suse.com
- Patch re-factoring, so that we don't have to compile with ldlm
+ 0001-Use-cmap-for-getting-cluster-name.patch
+ 0002-Remove-controld-dependency-in-group_join-leave.patch
+ 0003-Auto-setup-cluster_stack-based-on-what-is-on-disk.patch
+ 0004-mkfs.ocfs2-Abort-if-cluster-information-is-not-detec.patch
+ 0005-mkfs-Setup-cluster_stack-if-not-setup-based-on-what-.patch
- 0001-libo2cb-Remove-controld-actions-from-group-join-leav.patch
- 0002-libo2cb-Remove-rest-of-controld-functions.patch
- 0003-Get-cluster-name-from-corosync-cmap.patch
- 0004-Remove-controld-structures-from-debugfs.ocfs2.patch
- 0005-Check-for-DLM-kernel-version-in-user_begin_group_joi.patch
- 0006-Add-cmap-and-dlm-libraries-in-the-tools.patch
- 0008-mount.ocfs2-Read-stack-from-device-and-setup-stack-i.patch
- 0009-mkfs.ocfs2-Abort-if-cluster-information-is-not-detec.patch
- 0010-mkfs-Setup-cluster_stack-if-not-setup-based-on-what-.patch
- 0011-Use-dlm_lt-instead-of-dlm-for-DLM-libraries.patch
-------------------------------------------------------------------
Tue Oct 1 15:07:57 UTC 2013 - rgoldwyn@suse.com

View File

@ -1,7 +1,7 @@
#
# spec file for package ocfs2-tools
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -47,16 +47,11 @@ Patch214: use-symlink-in-udev-rules.patch
Patch215: ocfs2console-libraries-include-aio.patch
Patch220: libocfs2-needs-libaio.patch
Patch221: libocfs2-Change-asserts-to-error.patch
Patch222: 0001-libo2cb-Remove-controld-actions-from-group-join-leav.patch
Patch223: 0002-libo2cb-Remove-rest-of-controld-functions.patch
Patch224: 0003-Get-cluster-name-from-corosync-cmap.patch
Patch225: 0004-Remove-controld-structures-from-debugfs.ocfs2.patch
Patch226: 0005-Check-for-DLM-kernel-version-in-user_begin_group_joi.patch
Patch227: 0006-Add-cmap-and-dlm-libraries-in-the-tools.patch
Patch228: 0008-mount.ocfs2-Read-stack-from-device-and-setup-stack-i.patch
Patch229: 0009-mkfs.ocfs2-Abort-if-cluster-information-is-not-detec.patch
Patch230: 0010-mkfs-Setup-cluster_stack-if-not-setup-based-on-what-.patch
Patch231: 0011-Use-dlm_lt-instead-of-dlm-for-DLM-libraries.patch
Patch222: 0001-Use-cmap-for-getting-cluster-name.patch
Patch223: 0002-Remove-controld-dependency-in-group_join-leave.patch
Patch224: 0003-Auto-setup-cluster_stack-based-on-what-is-on-disk.patch
Patch225: 0004-mkfs.ocfs2-Abort-if-cluster-information-is-not-detec.patch
Patch226: 0005-mkfs-Setup-cluster_stack-if-not-setup-based-on-what-.patch
BuildRequires: autoconf
BuildRequires: e2fsprogs-devel
@ -173,11 +168,6 @@ managing the file system.
%patch224 -p1
%patch225 -p1
%patch226 -p1
%patch227 -p1
%patch228 -p1
%patch229 -p1
%patch230 -p1
%patch231 -p1
%build
export PROJECT="ocfs2-tools"