This commit is contained in:
parent
3ab68e6d68
commit
1e9a023573
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0d0a8813b66eb2458ef158027d80fb4ffffe7fe672388bfcd87e30c20647bb2f
|
||||
size 443634
|
3
LVM2.2.02.38.tar.bz2
Normal file
3
LVM2.2.02.38.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2eb48e5ee80662aa122948da996576beb8f2b28c7fb4473163c568543d865b9a
|
||||
size 577326
|
@ -1,82 +0,0 @@
|
||||
--- daemons/clvmd/clvmd-openais.c
|
||||
+++ daemons/clvmd/clvmd-openais.c
|
||||
@@ -100,13 +100,6 @@
|
||||
SaNameT lock_name;
|
||||
};
|
||||
|
||||
-struct lock_wait
|
||||
-{
|
||||
- pthread_cond_t cond;
|
||||
- pthread_mutex_t mutex;
|
||||
- int status;
|
||||
-};
|
||||
-
|
||||
/* Set errno to something approximating the right value and return 0 or -1 */
|
||||
static int ais_to_errno(SaAisErrorT err)
|
||||
{
|
||||
@@ -245,12 +238,15 @@
|
||||
|
||||
memcpy(&target_nodeid, msg, OPENAIS_CSID_LEN);
|
||||
|
||||
- DEBUGLOG("Got message from nodeid %d for %d. len %d\n",
|
||||
- nodeid, target_nodeid, msg_len-4);
|
||||
+ DEBUGLOG("%u got message from nodeid %d for %d. len %d\n",
|
||||
+ our_nodeid, nodeid, target_nodeid, msg_len-4);
|
||||
|
||||
- if (target_nodeid == our_nodeid)
|
||||
- process_message(cluster_client, (char *)msg+OPENAIS_CSID_LEN,
|
||||
- msg_len-OPENAIS_CSID_LEN, (char*)&nodeid);
|
||||
+ if (nodeid != our_nodeid) //Not send by myself
|
||||
+ if (target_nodeid == our_nodeid || target_nodeid == 0)
|
||||
+ process_message(cluster_client,
|
||||
+ (char *)msg+OPENAIS_CSID_LEN,
|
||||
+ msg_len-OPENAIS_CSID_LEN,
|
||||
+ (char*)&nodeid);
|
||||
}
|
||||
|
||||
static void cpg_confchg_callback(cpg_handle_t handle,
|
||||
@@ -292,7 +288,44 @@
|
||||
ninfo->state = NODE_DOWN;
|
||||
}
|
||||
|
||||
+ for (i=0; i<member_list_entries; i++) {
|
||||
+ if (member_list[i].nodeid == 0) continue;
|
||||
+ ninfo = dm_hash_lookup_binary(node_hash,
|
||||
+ (char *)&member_list[i].nodeid,
|
||||
+ OPENAIS_CSID_LEN);
|
||||
+ if (!ninfo) {
|
||||
+ ninfo = malloc(sizeof(struct node_info));
|
||||
+ if (!ninfo) {
|
||||
+ break;
|
||||
+ }
|
||||
+ else {
|
||||
+ ninfo->nodeid = member_list[i].nodeid;
|
||||
+ dm_hash_insert_binary(node_hash,
|
||||
+ (char *)&ninfo->nodeid,
|
||||
+ OPENAIS_CSID_LEN, ninfo);
|
||||
+ }
|
||||
+ }
|
||||
+ ninfo->state = NODE_CLVMD;
|
||||
+ }
|
||||
+
|
||||
num_nodes = joined_list_entries;
|
||||
+
|
||||
+ //Verbose on node_hash, helpful to debug
|
||||
+ struct dm_hash_node *hn;
|
||||
+ DEBUGLOG("Iterate node_hash\n");
|
||||
+ dm_hash_iterate(hn, node_hash)
|
||||
+ {
|
||||
+ ninfo = dm_hash_get_data(node_hash, hn);
|
||||
+ if (ninfo->state == NODE_CLVMD) {
|
||||
+ DEBUGLOG("%u:%s\n", ninfo->nodeid, "CLVMD");
|
||||
+ }
|
||||
+ else {
|
||||
+ if (ninfo->state == NODE_DOWN)
|
||||
+ DEBUGLOG("%u:%s\n", ninfo->nodeid, "DOWN");
|
||||
+ }
|
||||
+ }
|
||||
+ DEBUGLOG("Iterate node_hash done\n");
|
||||
+
|
||||
}
|
||||
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- daemons/clvmd/clvmd-openais.c
|
||||
+++ daemons/clvmd/clvmd-openais.c
|
||||
@@ -308,7 +308,7 @@
|
||||
ninfo->state = NODE_CLVMD;
|
||||
}
|
||||
|
||||
- num_nodes = joined_list_entries;
|
||||
+ num_nodes = member_list_entries;
|
||||
|
||||
//Verbose on node_hash, helpful to debug
|
||||
struct dm_hash_node *hn;
|
@ -1,168 +0,0 @@
|
||||
--- daemons/clvmd/clvmd-openais.c
|
||||
+++ daemons/clvmd/clvmd-openais.c
|
||||
@@ -50,11 +50,6 @@
|
||||
/* Timeout value for several openais calls */
|
||||
#define TIMEOUT 10
|
||||
|
||||
-static void lck_lock_callback(SaInvocationT invocation,
|
||||
- SaLckLockStatusT lockStatus,
|
||||
- SaAisErrorT error);
|
||||
-static void lck_unlock_callback(SaInvocationT invocation,
|
||||
- SaAisErrorT error);
|
||||
static void cpg_deliver_callback (cpg_handle_t handle,
|
||||
struct cpg_name *groupName,
|
||||
uint32_t nodeid,
|
||||
@@ -92,11 +87,6 @@
|
||||
.cpg_confchg_fn = cpg_confchg_callback,
|
||||
};
|
||||
|
||||
-SaLckCallbacksT lck_callbacks = {
|
||||
- .saLckLockGrantCallback = lck_lock_callback,
|
||||
- .saLckResourceUnlockCallback = lck_unlock_callback
|
||||
-};
|
||||
-
|
||||
struct node_info
|
||||
{
|
||||
enum {NODE_UNKNOWN, NODE_DOWN, NODE_UP, NODE_CLVMD} state;
|
||||
@@ -305,32 +295,6 @@
|
||||
num_nodes = joined_list_entries;
|
||||
}
|
||||
|
||||
-static void lck_lock_callback(SaInvocationT invocation,
|
||||
- SaLckLockStatusT lockStatus,
|
||||
- SaAisErrorT error)
|
||||
-{
|
||||
- struct lock_wait *lwait = (struct lock_wait *)(long)invocation;
|
||||
-
|
||||
- DEBUGLOG("lck_lock_callback, error = %d\n", error);
|
||||
-
|
||||
- lwait->status = error;
|
||||
- pthread_mutex_lock(&lwait->mutex);
|
||||
- pthread_cond_signal(&lwait->cond);
|
||||
- pthread_mutex_unlock(&lwait->mutex);
|
||||
-}
|
||||
-
|
||||
-static void lck_unlock_callback(SaInvocationT invocation,
|
||||
- SaAisErrorT error)
|
||||
-{
|
||||
- struct lock_wait *lwait = (struct lock_wait *)(long)invocation;
|
||||
-
|
||||
- DEBUGLOG("lck_unlock_callback\n");
|
||||
-
|
||||
- lwait->status = SA_AIS_OK;
|
||||
- pthread_mutex_lock(&lwait->mutex);
|
||||
- pthread_cond_signal(&lwait->cond);
|
||||
- pthread_mutex_unlock(&lwait->mutex);
|
||||
-}
|
||||
|
||||
static int lck_dispatch(struct local_client *client, char *buf, int len,
|
||||
const char *csid, struct local_client **new_client)
|
||||
@@ -359,7 +323,7 @@
|
||||
}
|
||||
|
||||
err = saLckInitialize(&lck_handle,
|
||||
- &lck_callbacks,
|
||||
+ NULL,
|
||||
&ver);
|
||||
if (err != SA_AIS_OK) {
|
||||
cpg_initialize(&cpg_handle, &cpg_callbacks);
|
||||
@@ -495,15 +459,11 @@
|
||||
/* Real locking */
|
||||
static int _lock_resource(char *resource, int mode, int flags, int *lockid)
|
||||
{
|
||||
- struct lock_wait lwait;
|
||||
struct lock_info *linfo;
|
||||
SaLckResourceHandleT res_handle;
|
||||
SaAisErrorT err;
|
||||
SaLckLockIdT lock_id;
|
||||
-
|
||||
- pthread_cond_init(&lwait.cond, NULL);
|
||||
- pthread_mutex_init(&lwait.mutex, NULL);
|
||||
- pthread_mutex_lock(&lwait.mutex);
|
||||
+ SaLckLockStatusT lockStatus;
|
||||
|
||||
/* This needs to be converted from DLM/LVM2 value for OpenAIS LCK */
|
||||
if (flags & LCK_NONBLOCK) flags = SA_LCK_LOCK_NO_QUEUE;
|
||||
@@ -526,24 +486,24 @@
|
||||
return ais_to_errno(err);
|
||||
}
|
||||
|
||||
- err = saLckResourceLockAsync(res_handle,
|
||||
- (SaInvocationT)(long)&lwait,
|
||||
- &lock_id,
|
||||
- mode,
|
||||
- flags,
|
||||
- 0);
|
||||
- if (err != SA_AIS_OK)
|
||||
+ err = saLckResourceLock(
|
||||
+ res_handle,
|
||||
+ &lock_id,
|
||||
+ mode,
|
||||
+ flags,
|
||||
+ 0,
|
||||
+ SA_TIME_END,
|
||||
+ &lockStatus);
|
||||
+ if (err != SA_AIS_OK && lockStatus != SA_LCK_LOCK_GRANTED)
|
||||
{
|
||||
free(linfo);
|
||||
saLckResourceClose(res_handle);
|
||||
return ais_to_errno(err);
|
||||
}
|
||||
-
|
||||
+
|
||||
/* Wait for it to complete */
|
||||
- pthread_cond_wait(&lwait.cond, &lwait.mutex);
|
||||
- pthread_mutex_unlock(&lwait.mutex);
|
||||
|
||||
- DEBUGLOG("lock_resource returning %d, lock_id=%llx\n", lwait.status,
|
||||
+ DEBUGLOG("lock_resource returning %d, lock_id=%llx\n", err,
|
||||
lock_id);
|
||||
|
||||
linfo->lock_id = lock_id;
|
||||
@@ -551,43 +511,34 @@
|
||||
|
||||
dm_hash_insert(lock_hash, resource, linfo);
|
||||
|
||||
- return ais_to_errno(lwait.status);
|
||||
+ return ais_to_errno(err);
|
||||
}
|
||||
|
||||
|
||||
static int _unlock_resource(char *resource, int lockid)
|
||||
{
|
||||
- struct lock_wait lwait;
|
||||
SaAisErrorT err;
|
||||
struct lock_info *linfo;
|
||||
|
||||
- pthread_cond_init(&lwait.cond, NULL);
|
||||
- pthread_mutex_init(&lwait.mutex, NULL);
|
||||
- pthread_mutex_lock(&lwait.mutex);
|
||||
-
|
||||
DEBUGLOG("unlock_resource %s\n", resource);
|
||||
linfo = dm_hash_lookup(lock_hash, resource);
|
||||
if (!linfo)
|
||||
return 0;
|
||||
|
||||
DEBUGLOG("unlock_resource: lockid: %llx\n", linfo->lock_id);
|
||||
- err = saLckResourceUnlockAsync((SaInvocationT)(long)&lwait, linfo->lock_id);
|
||||
+ err = saLckResourceUnlock(linfo->lock_id, SA_TIME_END);
|
||||
if (err != SA_AIS_OK)
|
||||
{
|
||||
DEBUGLOG("Unlock returned %d\n", err);
|
||||
return ais_to_errno(err);
|
||||
}
|
||||
|
||||
- /* Wait for it to complete */
|
||||
- pthread_cond_wait(&lwait.cond, &lwait.mutex);
|
||||
- pthread_mutex_unlock(&lwait.mutex);
|
||||
-
|
||||
/* Release the resource */
|
||||
dm_hash_remove(lock_hash, resource);
|
||||
saLckResourceClose(linfo->res_handle);
|
||||
free(linfo);
|
||||
|
||||
- return ais_to_errno(lwait.status);
|
||||
+ return ais_to_errno(err);
|
||||
}
|
||||
|
||||
static int _sync_lock(const char *resource, int mode, int flags, int *lockid)
|
@ -1,9 +1,9 @@
|
||||
--- daemons/clvmd/clvmd.c
|
||||
+++ daemons/clvmd/clvmd.c
|
||||
@@ -37,7 +37,7 @@
|
||||
#include <getopt.h>
|
||||
#include <syslog.h>
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
-#include <libdlm.h>
|
||||
+//#include <libdlm.h>
|
||||
|
||||
|
30
lvm2.changes
30
lvm2.changes
@ -1,3 +1,33 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 27 07:51:31 CEST 2008 - xwhu@suse.de
|
||||
|
||||
- update to 2.02.38
|
||||
Fix tracking of validity of PVs with no mdas in lvmcache.
|
||||
Fix return values for reporting commands when run with no PVs, LVs, or VGs.
|
||||
Fix free_count when reading pool metadata.
|
||||
Fix segfault when using pvcreate on a device containing pool metadata.
|
||||
Fix segfault after _free_vginfo by remembering to remove vginfo from list.
|
||||
Fix setpriority error message to signed int.
|
||||
Fix uninitialised mutex in clvmd if all daemons are not running at startup.
|
||||
Fix fsadm.sh to work with older blockdev, blkid & readlink binaries.
|
||||
Fix lvresize to pass new size to fsadm when extending device.
|
||||
Fix nodes list in clvmd-openais, and allow for broadcast messages.
|
||||
Fix vgsplit internal counting of snapshot LVs.
|
||||
Fix vgmerge snapshot_count when source VG contains snapshots.
|
||||
Fix internal LV counter when a snapshot is removed.
|
||||
Fix metadata corruption writing lvm1-formatted metadata with snapshots.
|
||||
Fix lvconvert -m0 allocatable space check.
|
||||
Fix vgdisplay 'Cur LV' field to match lvdisplay output.
|
||||
Fix lv_count report field to exclude hidden LVs.
|
||||
Fix vgsplit to only move hidden 'snapshotN' LVs when necessary.
|
||||
Fix vgreduce to use vg_split_mdas to check sufficient mdas remain.
|
||||
Fix orphan VG name used for format_pool.
|
||||
Fix output if overriding command_names on cmdline.
|
||||
Fix vgsplit locking of new VG (2.02.30).
|
||||
Fix redundant lvresize message if vg doesn't exist.
|
||||
Fix another allocation bug with clvmd and large node IDs.
|
||||
Fix uninitialised variable in clvmd that could cause odd hangs.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 5 11:19:29 CEST 2008 - aj@suse.de
|
||||
|
||||
|
41
lvm2.spec
41
lvm2.spec
@ -1,5 +1,5 @@
|
||||
#
|
||||
# spec file for package lvm2 (Version 2.02.33)
|
||||
# spec file for package lvm2 (Version 2.02.38)
|
||||
#
|
||||
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# This file and all modifications and additions to the pristine
|
||||
@ -14,13 +14,13 @@ Name: lvm2
|
||||
BuildRequires: device-mapper-devel openais-devel
|
||||
License: GPL v2 or later; LGPL v2.1 or later
|
||||
Group: System/Base
|
||||
Requires: device-mapper >= 1.02.23
|
||||
Requires: device-mapper >= 1.02.25
|
||||
Provides: lvm
|
||||
Obsoletes: lvm
|
||||
PreReq: %fillup_prereq %insserv_prereq
|
||||
AutoReqProv: on
|
||||
Version: 2.02.33
|
||||
Release: 22
|
||||
Version: 2.02.38
|
||||
Release: 1
|
||||
Summary: LVM2 Tools
|
||||
Source: LVM2.%{version}.tar.bz2
|
||||
Source1: lvm.conf
|
||||
@ -36,9 +36,6 @@ Patch10: lvm-no_chown.diff
|
||||
Patch11: cmdline_large_minor.diff
|
||||
Patch12: enable-clvmd.patch
|
||||
Patch13: pipe_buff-definition.diff
|
||||
Patch14: clvmd-openais-sync.diff
|
||||
Patch15: clvmd-fix-node-hash.diff
|
||||
Patch16: clvmd-node-number-fix.diff
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
@ -70,9 +67,6 @@ A daemon for using LVM2 Logival Volumes in a clustered environment.
|
||||
%patch11
|
||||
%patch12
|
||||
%patch13
|
||||
%patch14
|
||||
%patch15
|
||||
%patch16
|
||||
|
||||
%build
|
||||
CFLAGS="$RPM_OPT_FLAGS" MODPROBE_CMD=/sbin/modprobe \
|
||||
@ -226,6 +220,33 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_mandir}/man8/vgsplit.8.gz
|
||||
|
||||
%changelog
|
||||
* Fri Jun 27 2008 xwhu@suse.de
|
||||
- update to 2.02.38
|
||||
Fix tracking of validity of PVs with no mdas in lvmcache.
|
||||
Fix return values for reporting commands when run with no PVs, LVs, or VGs.
|
||||
Fix free_count when reading pool metadata.
|
||||
Fix segfault when using pvcreate on a device containing pool metadata.
|
||||
Fix segfault after _free_vginfo by remembering to remove vginfo from list.
|
||||
Fix setpriority error message to signed int.
|
||||
Fix uninitialised mutex in clvmd if all daemons are not running at startup.
|
||||
Fix fsadm.sh to work with older blockdev, blkid & readlink binaries.
|
||||
Fix lvresize to pass new size to fsadm when extending device.
|
||||
Fix nodes list in clvmd-openais, and allow for broadcast messages.
|
||||
Fix vgsplit internal counting of snapshot LVs.
|
||||
Fix vgmerge snapshot_count when source VG contains snapshots.
|
||||
Fix internal LV counter when a snapshot is removed.
|
||||
Fix metadata corruption writing lvm1-formatted metadata with snapshots.
|
||||
Fix lvconvert -m0 allocatable space check.
|
||||
Fix vgdisplay 'Cur LV' field to match lvdisplay output.
|
||||
Fix lv_count report field to exclude hidden LVs.
|
||||
Fix vgsplit to only move hidden 'snapshotN' LVs when necessary.
|
||||
Fix vgreduce to use vg_split_mdas to check sufficient mdas remain.
|
||||
Fix orphan VG name used for format_pool.
|
||||
Fix output if overriding command_names on cmdline.
|
||||
Fix vgsplit locking of new VG (2.02.30).
|
||||
Fix redundant lvresize message if vg doesn't exist.
|
||||
Fix another allocation bug with clvmd and large node IDs.
|
||||
Fix uninitialised variable in clvmd that could cause odd hangs.
|
||||
* Mon May 05 2008 aj@suse.de
|
||||
- Fix requires of clvm.
|
||||
* Wed Apr 30 2008 hare@suse.de
|
||||
|
Loading…
x
Reference in New Issue
Block a user