ocfs2-tools/0005-Check-for-DLM-kernel-version-in-user_begin_group_joi.patch
Goldwyn Rodrigues ab40e465fc Accepting request 196156 from home:goldwynr:branches:network:ha-clustering:Factory
- Make mount.ocfs2 load modules and write cluster_stack:
  + 0007-mount.ocfs2-performs-module-loading-cluster_stack-se.patch

- Mark o2cb.ocf as obsolete. Anyone using o2cb.ocf will get an
  info message stating so.

- The nocontrold effort (added nocontrold patches and disabled
  corosync-2.3 controld compatibility patches): 
  + 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
  - 0001-Remove-pacemaker-ais-stuff.patch
  - 0002-Add-corosync-cfg-to-get-configuration-information.patch
  - 0003-Remove-daemon-protocol-versions-and-consolidate-fs-v.patch
  - 0005-Add-cluster_name-and-stack-name.patch

- libocfs2-Change-asserts-to-error.patch: Return control to 
  fsck.ocfs2 instead of erring

OBS-URL: https://build.opensuse.org/request/show/196156
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/ocfs2-tools?expand=0&rev=64
2013-08-24 04:21:23 +00:00

45 lines
1.2 KiB
Diff

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 5/7] 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