Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=5c…
Commit: 5cb583fcf1293adc9df5abb01593167945dd0b0f
Parent: dd78e9fdcf6546c2c6dda88b60251d5f60d07f04
Author: Chris Feist <cfeist(a)redhat.com>
AuthorDate: Mon Jun 27 15:35:32 2011 -0500
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Tue Oct 25 18:15:53 2011 -0400
rgmanager: Fix ASEHAagent to allow for multiple ASEHA resources on one machine.
Resolves: rhbz#690265
Reviewed-by: Lon Hohberger <lhh(a)redhat.com>
---
rgmanager/src/resources/ASEHAagent.sh | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/rgmanager/src/resources/ASEHAagent.sh b/rgmanager/src/resources/ASEHAagent.sh
index 4c906a9..fb756d0 100755
--- a/rgmanager/src/resources/ASEHAagent.sh
+++ b/rgmanager/src/resources/ASEHAagent.sh
@@ -89,7 +89,7 @@ meta_data()
<content type="string" />
</parameter>
- <parameter name="sybase_home" unique="1" required="1">
+ <parameter name="sybase_home" required="1">
<longdesc lang="en">
The home directory of sybase products
</longdesc>
@@ -99,7 +99,7 @@ meta_data()
<content type="string" />
</parameter>
- <parameter name="sybase_ase" unique="1" required="1">
+ <parameter name="sybase_ase" required="1">
<longdesc lang="en">
The directory name under sybase_home where ASE products are installed
</longdesc>
@@ -109,7 +109,7 @@ meta_data()
<content type="string" default="ASE-15_0" />
</parameter>
- <parameter name="sybase_ocs" unique="1" required="1">
+ <parameter name="sybase_ocs" required="1">
<longdesc lang="en">
The directory name under sybase_home where OCS products are installed, i.e. ASE-15_0
</longdesc>
@@ -119,7 +119,7 @@ meta_data()
<content type="string" default="OCS-15_0" />
</parameter>
- <parameter name="server_name" unique="1" required="1">
+ <parameter name="server_name" required="1">
<longdesc lang="en">
The ASE server name which is configured for the HA service
</longdesc>
@@ -129,7 +129,7 @@ meta_data()
<content type="string" />
</parameter>
- <parameter name="login_file" unique="1" required="1">
+ <parameter name="login_file" required="1">
<longdesc lang="en">
The full path of login file which contains the login/password pair
</longdesc>
@@ -139,7 +139,7 @@ meta_data()
<content type="string" />
</parameter>
- <parameter name="interfaces_file" unique="1" required="1">
+ <parameter name="interfaces_file" required="1">
<longdesc lang="en">
The full path of interfaces file which is used to start/access the ASE server
</longdesc>
@@ -149,7 +149,7 @@ meta_data()
<content type="string" />
</parameter>
- <parameter name="sybase_user" unique="1" required="1">
+ <parameter name="sybase_user" required="1">
<longdesc lang="en">
The user who can run ASE server
</longdesc>
@@ -159,7 +159,7 @@ meta_data()
<content type="string" default="sybase" />
</parameter>
- <parameter name="shutdown_timeout" unique="1" required="1">
+ <parameter name="shutdown_timeout" required="1">
<longdesc lang="en">
The maximum seconds to wait for the ASE server to shutdown before killing the process directly
</longdesc>
@@ -169,7 +169,7 @@ meta_data()
<content type="integer" default="0" />
</parameter>
- <parameter name="start_timeout" unique="1" required="1">
+ <parameter name="start_timeout" required="1">
<longdesc lang="en">
The maximum seconds to wait for an ASE server to complete before determining that the server had failed to start
</longdesc>
@@ -179,7 +179,7 @@ meta_data()
<content type="integer" default="0" />
</parameter>
- <parameter name="deep_probe_timeout" unique="1" required="1">
+ <parameter name="deep_probe_timeout" required="1">
<longdesc lang="en">
The maximum seconds to wait for the response of ASE server before determining that the server had no response while running deep probe
</longdesc>
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=dd…
Commit: dd78e9fdcf6546c2c6dda88b60251d5f60d07f04
Parent: 7106e41ced6b5d82a50cbca9e5c0e73ac99b1638
Author: Lon Hohberger <lhh(a)redhat.com>
AuthorDate: Fri Jul 29 13:30:38 2011 -0400
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Tue Oct 25 18:10:16 2011 -0400
rgmanager: Add -F to clusvcadm man page
Resolves: rhbz#715052
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
---
rgmanager/man/clusvcadm.8 | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/rgmanager/man/clusvcadm.8 b/rgmanager/man/clusvcadm.8
index d5e09eb..055a0bf 100644
--- a/rgmanager/man/clusvcadm.8
+++ b/rgmanager/man/clusvcadm.8
@@ -8,7 +8,7 @@ clusvcadm \- Cluster User Service Administration Utility
.B ]
.B [\-e
.I <service>
-.B ]
+.B [\-F] ]
.B [\-l]
.B [\-u]
.B [\-S]
@@ -52,10 +52,15 @@ on which the command is invoked.
Stops and disables the user service named
.I
service
-.IP "\-e <service>"
+.IP "\-e <service> [\-F]"
Enables and starts the user service named
.I
service
+
+Normally, rgmanager starts the service locally (i.e. on
+the host where clusvcadm was run). However, if the \fB-F\fP
+option is specified, rgmanager will use the assigned failover
+domain rules as hints on where to start the service.
.IP \-l
Lock services in preparation for cluster shutdown. This should only
be used if the administrator intends to perform a global, cluster
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=5a…
Commit: 5a67bbf795db62d9b20179f96b0ad17066cae4cd
Parent: 98c9f869ffb041341b835d19da3845b6165af7d2
Author: Adam Drew <adrew(a)redhat.com>
AuthorDate: Fri Oct 7 12:31:16 2011 -0400
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Tue Oct 25 18:02:33 2011 -0400
rgmanager: Fix dependency restart bug in CP mode
If we:
- had central_processing mode enabled,
- had a service with 'depend' set on another
service,
- we attempted to restart the service with the
dependency, and
- the dependency was missing
rgmanager would leave the state in 'recovering'
This is the corrected patch from Adam.
Resolves: rhbz#743442
Signed-off-by: Adam Drew <adrew(a)redhat.com>
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
---
rgmanager/src/resources/default_event_script.sl | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/rgmanager/src/resources/default_event_script.sl b/rgmanager/src/resources/default_event_script.sl
index d567465..cdde066 100644
--- a/rgmanager/src/resources/default_event_script.sl
+++ b/rgmanager/src/resources/default_event_script.sl
@@ -158,6 +158,7 @@ define move_or_start(service, node_list)
(,,, owner, state) = service_status(depends);
if (owner < 0) {
debug(service, " is not runnable; dependency not met");
+ ()=service_stop(service);
return ERR_DEPEND;
}
}
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=98…
Commit: 98c9f869ffb041341b835d19da3845b6165af7d2
Parent: 886d6504464e4af32d02da0d64fd09a040b65fe4
Author: Lon Hohberger <lhh(a)redhat.com>
AuthorDate: Fri Oct 7 12:31:16 2011 -0400
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Tue Oct 25 17:47:44 2011 -0400
rgmanager: Fix dependency restart bug
If we:
- had a service with 'depend' set on another
service,
- both services were running on the same host,
- that host died, and
- the service which depended on the other service
also had the 'restart' recovery policy,
rgmanager would enter handle_start_req and return
an immediate error - with no further recovery action
performed.
Resolves: rhbz#743442
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
---
rgmanager/src/daemons/rg_state.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/rgmanager/src/daemons/rg_state.c b/rgmanager/src/daemons/rg_state.c
index dce28db..c02bfda 100644
--- a/rgmanager/src/daemons/rg_state.c
+++ b/rgmanager/src/daemons/rg_state.c
@@ -2131,8 +2131,16 @@ handle_start_req(char *svcName, int req, int *new_owner)
/* Check for dependency. We cannot start unless our
dependency is met */
- if (check_depend_safe(svcName) == 0)
+ if (check_depend_safe(svcName) == 0) {
+ if (req == RG_START_RECOVER) {
+ clulog(LOG_INFO, "Dependency for %s missing "
+ "during recovery; marking as stopped",
+ svcName);
+
+ _svc_stop_finish(svcName, 0, RG_STATE_STOPPED);
+ }
return RG_EDEPEND;
+ }
/*
* This is a 'root' start request. We need to clear out our failure
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=88…
Commit: 886d6504464e4af32d02da0d64fd09a040b65fe4
Parent: 141d1d9241b2ad2cd8865d524a6b38dc069fffd3
Author: Lon Hohberger <lhh(a)redhat.com>
AuthorDate: Tue Sep 6 15:42:41 2011 -0400
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Tue Oct 25 17:47:02 2011 -0400
rgmanager: Resolve rare deadlock
In very rare cases, it was possible to fill up a pipe used for
IPC between threads during reconfiguration, causing a deadlock.
This patch resolves the issue.
Resolves: rhbz#713243
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
---
rgmanager/src/daemons/groups.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/rgmanager/src/daemons/groups.c b/rgmanager/src/daemons/groups.c
index b546421..1e93e03 100644
--- a/rgmanager/src/daemons/groups.c
+++ b/rgmanager/src/daemons/groups.c
@@ -1737,8 +1737,6 @@ init_resource_groups(int reconfigure, int do_init, int new_config_version)
free(val);
}
- /* Wait for any pending requests */
- rg_wait_threads();
/* Block operations that would break during configuration
changes */
rg_clear_initialized(FL_CONFIG);
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=5c…
Commit: 5ce78b0a1a1c5851524497b305a568e52043cf09
Parent: a95fcca7ecd070c0fef1b85d3158e728b04c3398
Author: Adam Drew <adrew(a)redhat.com>
AuthorDate: Fri Oct 7 12:31:16 2011 -0400
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Tue Oct 25 17:31:15 2011 -0400
rgmanager: Fix dependency restart bug in CP mode
If we:
- had central_processing mode enabled,
- had a service with 'depend' set on another
service,
- we attempted to restart the service with the
dependency, and
- the dependency was missing
rgmanager would leave the state in 'recovering'
This is the corrected patch from Adam.
Resolves: rhbz#743442
Signed-off-by: Adam Drew <adrew(a)redhat.com>
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
---
rgmanager/src/resources/default_event_script.sl | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/rgmanager/src/resources/default_event_script.sl b/rgmanager/src/resources/default_event_script.sl
index 759215c..4c5ca0e 100644
--- a/rgmanager/src/resources/default_event_script.sl
+++ b/rgmanager/src/resources/default_event_script.sl
@@ -178,6 +178,7 @@ define move_or_start(service, node_list)
(,,, owner, state) = service_status(depends);
if (owner < 0) {
debug(service, " is not runnable; dependency not met");
+ ()=service_stop(service);
return ERR_DEPEND;
}
}
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=c7…
Commit: c751d1894640b096808d2f13e331bee4c536f96a
Parent: 90373b84a47814c38ba030509882bc8cca3fe458
Author: Lon Hohberger <lhh(a)redhat.com>
AuthorDate: Fri Oct 7 12:31:16 2011 -0400
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Thu Oct 13 16:15:57 2011 -0400
rgmanager: Fix dependency restart bug in CP mode
If we:
- had central_processing mode enabled,
- had a service with 'depend' set on another
service,
- we attempted to restart the service with the
dependency, and
- the dependency was missing
rgmanager would leave the state in 'recovering'
Resolves: rhbz#743442
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
---
rgmanager/src/resources/default_event_script.sl | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/rgmanager/src/resources/default_event_script.sl b/rgmanager/src/resources/default_event_script.sl
index 759215c..57f65e9 100644
--- a/rgmanager/src/resources/default_event_script.sl
+++ b/rgmanager/src/resources/default_event_script.sl
@@ -178,6 +178,9 @@ define move_or_start(service, node_list)
(,,, owner, state) = service_status(depends);
if (owner < 0) {
debug(service, " is not runnable; dependency not met");
+ if (state == "recovering") {
+ service_stop(service);
+ }
return ERR_DEPEND;
}
}
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=80…
Commit: 8034c6d0c7f68e6e8d823d65edda986b4a4f510b
Parent: 523abe7c546805181ea3969b61d01aa23402335e
Author: Christine Caulfield <ccaulfie(a)redhat.com>
AuthorDate: Fri Sep 19 13:02:40 2008 +0100
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: Mon Oct 17 10:09:53 2011 +0200
cman: Clean shutdown_con if the controlling process is killed.
If a shutdown is initiated by a process that is then killed, the
shutdown_con isn't cleared. So if another process replies to the
shutdown request cman could segfault.
Resolves: rhbz#590101
Signed-off-by: Christine Caulfield <ccaulfie(a)redhat.com>
Signed-off-by: Fabio M. Di Nitto <fdintto(a)redhat.com>
---
cman/daemon/commands.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/cman/daemon/commands.c b/cman/daemon/commands.c
index ddc85ec..1fafdac 100644
--- a/cman/daemon/commands.c
+++ b/cman/daemon/commands.c
@@ -1541,6 +1541,11 @@ void unbind_con(struct connection *con)
check_shutdown_status();
}
+
+ /* If the controlling shutdown process has quit, then cancel the
+ shutdown session */
+ if (con == shutdown_con)
+ shutdown_con = NULL;
}
/* Post a PORT OPEN/CLOSE event to anyone listening on this end */
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=c2…
Commit: c2697a0eae26d6542edbaaf72efdeb4cbf6e476f
Parent: afe8df67ab28a9fed6ba01a4a952354a012d9b25
Author: Lon Hohberger <lhh(a)redhat.com>
AuthorDate: Fri Oct 7 12:31:16 2011 -0400
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Tue Oct 11 18:59:57 2011 -0400
rgmanager: Fix dependency restart bug
If we:
- had a service with 'depend' set on another
service,
- both services were running on the same host,
- that host died, and
- the service which depended on the other service
also had the 'restart' recovery policy,
rgmanager would enter handle_start_req and return
an immediate error - with no further recovery action
performed.
Resolves: rhbz#743442
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
---
rgmanager/src/daemons/rg_state.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/rgmanager/src/daemons/rg_state.c b/rgmanager/src/daemons/rg_state.c
index 3db6bd9..0d6a0e5 100644
--- a/rgmanager/src/daemons/rg_state.c
+++ b/rgmanager/src/daemons/rg_state.c
@@ -2075,8 +2075,16 @@ handle_start_req(char *svcName, int req, int *new_owner)
/* Check for dependency. We cannot start unless our
dependency is met */
- if (check_depend_safe(svcName) == 0)
+ if (check_depend_safe(svcName) == 0) {
+ if (req == RG_START_RECOVER) {
+ logt_print(LOG_INFO, "Dependency for %s missing "
+ "during recovery; marking as stopped",
+ svcName);
+
+ _svc_stop_finish(svcName, 0, RG_STATE_STOPPED);
+ }
return RG_EDEPEND;
+ }
/*
* This is a 'root' start request. We need to clear out our failure
Gitweb: http://git.fedorahosted.org/git/dlm.git?p=dlm.git;a=commitdiff;h=a93c6d5bcb…
Commit: a93c6d5bcb9ddf52fa524895a65ce3aedb71819b
Parent: d4cf6836ee60d12d07841b44986cf443a8b4f2ce
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Tue Oct 11 13:49:10 2011 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue Oct 11 13:49:10 2011 -0500
dlm_controld: reorganize quorum/fencing checks
prepare for different fencing system(s)
Signed-off-by: David Teigland <teigland(a)redhat.com>
---
dlm_controld/cpg.c | 70 ++++++++++++++++++++++++++++++---------------
dlm_controld/dlm_daemon.h | 2 +-
dlm_controld/main.c | 2 +-
3 files changed, 49 insertions(+), 25 deletions(-)
diff --git a/dlm_controld/cpg.c b/dlm_controld/cpg.c
index 4bf7d1d..1d238ed 100644
--- a/dlm_controld/cpg.c
+++ b/dlm_controld/cpg.c
@@ -71,6 +71,7 @@ struct node {
int check_fs;
int fs_notified;
+ int request_fencing;
int check_fencing;
uint64_t fail_realtime;
uint64_t fence_realtime;
@@ -525,6 +526,7 @@ static void node_history_lockspace_fail(struct lockspace *ls, int nodeid,
}
if (cfgd_enable_fencing && node->start_time) {
+ node->request_fencing = 1;
node->check_fencing = 1;
node->fence_realtime = 0;
node->fence_queries = 0;
@@ -650,6 +652,34 @@ static int check_fencing_done(struct lockspace *ls)
return 1;
}
+static int need_fencing(struct lockspace *ls)
+{
+ struct node *node;
+
+ list_for_each_entry(node, &ls->node_history, list) {
+ if (node->check_fencing)
+ return 1;
+ }
+ return 0;
+}
+
+static void request_fencing(struct lockspace *ls)
+{
+ struct node *node;
+
+ list_for_each_entry(node, &ls->node_history, list) {
+ if (!node->request_fencing)
+ continue;
+
+ /* we don't need to ask fenced to initiate fencing; it does
+ so itself when it sees a fence domain member fail. Without
+ fenced we'll probably need to ask another daemon to initiate
+ fencing, then check with it above, like we check libfenced. */
+
+ node->request_fencing = 0;
+ }
+}
+
/* we know that the quorum value here is consistent with the cpg events
because the ringid's are in sync per the previous check_ringid_done */
@@ -661,11 +691,11 @@ static int check_quorum_done(struct lockspace *ls)
}
if (!cluster_quorate) {
- log_debug("check_quorum not quorate");
+ log_group(ls, "check_quorum not quorate");
return 0;
}
- log_debug("check_quorum done");
+ log_group(ls, "check_quorum done");
return 1;
}
@@ -791,34 +821,28 @@ static void stop_kernel(struct lockspace *ls, uint32_t seq)
don't need to check for because stop_kernel(), which is synchronous,
was done when the change was created */
+/* the fencing/quorum/fs conditions need to account for all the changes
+ that have occured since the last change applied to dlm-kernel, not
+ just the latest change */
+
static int wait_conditions_done(struct lockspace *ls)
{
- if (!check_ringid_done(ls)) {
- poll_ringid++;
+ if (!check_ringid_done(ls))
return 0;
- }
- /* the fencing/quorum/fs conditions need to account for all the changes
- that have occured since the last change applied to dlm-kernel, not
- just the latest change */
+ /* It's convenient to be able to join and leave lockspaces without
+ having quorum. If the fencing system does not wait for quorum
+ before carrying out fencing requests, then we may want to wait for
+ quorum here before requesting fencing, to avoid having partitioned
+ nodes fence good nodes. */
- if (!check_fencing_done(ls)) {
- poll_fencing++;
+ if (need_fencing(ls) && !check_quorum_done(ls))
return 0;
- }
- /* fencing waits for quorum, so we don't need to check quorum for any
- reasons related to safety or protection, so enable_quorum defaults
- to 0. This does mean that lockspaces (and cluster fs's) can be
- started/enabled in an inquorate cluster if there are no outstanding
- fencing operations. Some users or apps may want lockspaces/fs's to
- only be enabled in a quorate cluster; enable_quorum can be set to 1
- to get that behavior. The main advantage of not waiting for quorum
- here is to allow lockspaces to be shut down (and cluster fs's
- unmounted) in an inquorate cluster. */
+ request_fencing(ls);
- if (!check_quorum_done(ls)) {
- poll_quorum++;
+ if (!check_fencing_done(ls)) {
+ poll_fencing++;
return 0;
}
@@ -1903,7 +1927,7 @@ int dlm_join_lockspace(struct lockspace *ls)
/* TODO: allow global_id to be set in cluster.conf? */
ls->global_id = cpgname_to_crc(name.value, name.length);
- log_debug("cpg_join %s ...", name.value);
+ log_group(ls, "cpg_join %s ...", name.value);
retry:
error = cpg_join(h, &name);
if (error == CPG_ERR_TRY_AGAIN) {
diff --git a/dlm_controld/dlm_daemon.h b/dlm_controld/dlm_daemon.h
index 6129477..5209762 100644
--- a/dlm_controld/dlm_daemon.h
+++ b/dlm_controld/dlm_daemon.h
@@ -81,7 +81,7 @@
#define DEFAULT_DEBUG_LOGFILE 0
#define DEFAULT_ENABLE_FENCING 1
-#define DEFAULT_ENABLE_QUORUM 0
+#define DEFAULT_ENABLE_QUORUM 1
#define DEFAULT_ENABLE_PLOCK 1
#define DEFAULT_PLOCK_DEBUG 0
#define DEFAULT_PLOCK_RATE_LIMIT 0
diff --git a/dlm_controld/main.c b/dlm_controld/main.c
index 822a6a5..d28cc23 100644
--- a/dlm_controld/main.c
+++ b/dlm_controld/main.c
@@ -969,7 +969,7 @@ static void loop(void)
poll_timeout = -1;
- if (poll_fencing || poll_quorum || poll_fs) {
+ if (poll_fencing || poll_fs) {
process_lockspace_changes();
poll_timeout = 1000;
}
Gitweb: http://git.fedorahosted.org/git/dlm.git?p=dlm.git;a=commitdiff;h=91ba7d83c9…
Commit: 91ba7d83c9468ca3d9c1ca5e65e45347c1d9160b
Parent: 7ca6817d7a4dad7c4d96c41ad548ceccbd167e48
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Thu Oct 6 12:07:45 2011 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Thu Oct 6 12:07:45 2011 -0500
add license/copyright headers
Signed-off-by: David Teigland <teigland(a)redhat.com>
---
dlm_controld/action.c | 8 ++++++++
dlm_controld/config.c | 8 ++++++++
dlm_controld/cpg.c | 8 ++++++++
dlm_controld/crc.c | 8 ++++++++
dlm_controld/deadlock.c | 8 ++++++++
dlm_controld/dlm_controld.h | 8 ++++++++
dlm_controld/dlm_daemon.h | 8 ++++++++
dlm_controld/lib.c | 8 ++++++++
dlm_controld/libdlmcontrol.h | 8 ++++++++
dlm_controld/linux_endian.h | 8 ++++++++
dlm_controld/logging.c | 8 ++++++++
dlm_controld/main.c | 8 ++++++++
dlm_controld/member_cman.c | 8 ++++++++
dlm_controld/netlink.c | 8 ++++++++
dlm_controld/plock.c | 8 ++++++++
dlm_tool/main.c | 8 ++++++++
libdlm/libdlm.c | 9 +++++++++
libdlm/libdlm.h | 9 +++++++++
libdlm/libdlm_internal.h | 8 ++++++++
19 files changed, 154 insertions(+), 0 deletions(-)
diff --git a/dlm_controld/action.c b/dlm_controld/action.c
index e9148a1..237221a 100644
--- a/dlm_controld/action.c
+++ b/dlm_controld/action.c
@@ -1,3 +1,11 @@
+/*
+ * Copyright (C) 2004-2011 Red Hat, Inc. All rights reserved.
+ *
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License v.2.
+ */
+
#include "dlm_daemon.h"
#include <corosync/corotypes.h>
diff --git a/dlm_controld/config.c b/dlm_controld/config.c
index 6c94fca..7ceea6a 100644
--- a/dlm_controld/config.c
+++ b/dlm_controld/config.c
@@ -1,3 +1,11 @@
+/*
+ * Copyright (C) 2004-2011 Red Hat, Inc. All rights reserved.
+ *
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License v.2.
+ */
+
#include "dlm_daemon.h"
#include <libxml/tree.h>
diff --git a/dlm_controld/cpg.c b/dlm_controld/cpg.c
index b3c1454..49f7d02 100644
--- a/dlm_controld/cpg.c
+++ b/dlm_controld/cpg.c
@@ -1,3 +1,11 @@
+/*
+ * Copyright (C) 2004-2011 Red Hat, Inc. All rights reserved.
+ *
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License v.2.
+ */
+
#include "dlm_daemon.h"
struct protocol_version {
diff --git a/dlm_controld/crc.c b/dlm_controld/crc.c
index ff8c1d3..1764850 100644
--- a/dlm_controld/crc.c
+++ b/dlm_controld/crc.c
@@ -1,3 +1,11 @@
+/*
+ * Copyright (C) 2004-2011 Red Hat, Inc. All rights reserved.
+ *
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License v.2.
+ */
+
#include "dlm_daemon.h"
static const uint32_t crc_32_tab[] = {
diff --git a/dlm_controld/deadlock.c b/dlm_controld/deadlock.c
index 6aaabc5..9a7fd5d 100644
--- a/dlm_controld/deadlock.c
+++ b/dlm_controld/deadlock.c
@@ -1,3 +1,11 @@
+/*
+ * Copyright (C) 2004-2011 Red Hat, Inc. All rights reserved.
+ *
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License v.2.
+ */
+
#include "dlm_daemon.h"
#include "libdlm.h"
diff --git a/dlm_controld/dlm_controld.h b/dlm_controld/dlm_controld.h
index 73e4ecc..a802882 100644
--- a/dlm_controld/dlm_controld.h
+++ b/dlm_controld/dlm_controld.h
@@ -1,3 +1,11 @@
+/*
+ * Copyright (C) 2004-2011 Red Hat, Inc. All rights reserved.
+ *
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License v.2.
+ */
+
#ifndef __DLM_CONTROLD_DOT_H__
#define __DLM_CONTROLD_DOT_H__
diff --git a/dlm_controld/dlm_daemon.h b/dlm_controld/dlm_daemon.h
index d0975af..27c9d7a 100644
--- a/dlm_controld/dlm_daemon.h
+++ b/dlm_controld/dlm_daemon.h
@@ -1,3 +1,11 @@
+/*
+ * Copyright (C) 2004-2011 Red Hat, Inc. All rights reserved.
+ *
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License v.2.
+ */
+
#ifndef __DLM_DAEMON_DOT_H__
#define __DLM_DAEMON_DOT_H__
diff --git a/dlm_controld/lib.c b/dlm_controld/lib.c
index e714ff9..311b6e9 100644
--- a/dlm_controld/lib.c
+++ b/dlm_controld/lib.c
@@ -1,3 +1,11 @@
+/*
+ * Copyright (C) 2004-2011 Red Hat, Inc. All rights reserved.
+ *
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License v.2.
+ */
+
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
diff --git a/dlm_controld/libdlmcontrol.h b/dlm_controld/libdlmcontrol.h
index 64a3814..5a9404f 100644
--- a/dlm_controld/libdlmcontrol.h
+++ b/dlm_controld/libdlmcontrol.h
@@ -1,3 +1,11 @@
+/*
+ * Copyright (C) 2004-2011 Red Hat, Inc. All rights reserved.
+ *
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License v.2.
+ */
+
#ifndef _LIBDLMCONTROL_H_
#define _LIBDLMCONTROL_H_
diff --git a/dlm_controld/linux_endian.h b/dlm_controld/linux_endian.h
index 43089d2..8736b5b 100644
--- a/dlm_controld/linux_endian.h
+++ b/dlm_controld/linux_endian.h
@@ -1,3 +1,11 @@
+/*
+ * Copyright (C) 2004-2011 Red Hat, Inc. All rights reserved.
+ *
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License v.2.
+ */
+
#ifndef __LINUX_ENDIAN_DOT_H__
#define __LINUX_ENDIAN_DOT_H__
diff --git a/dlm_controld/logging.c b/dlm_controld/logging.c
index bf1a0eb..803d08a 100644
--- a/dlm_controld/logging.c
+++ b/dlm_controld/logging.c
@@ -1,3 +1,11 @@
+/*
+ * Copyright (C) 2004-2011 Red Hat, Inc. All rights reserved.
+ *
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License v.2.
+ */
+
#include "dlm_daemon.h"
static int syslog_facility;
diff --git a/dlm_controld/main.c b/dlm_controld/main.c
index a931aa6..822a6a5 100644
--- a/dlm_controld/main.c
+++ b/dlm_controld/main.c
@@ -1,3 +1,11 @@
+/*
+ * Copyright (C) 2004-2011 Red Hat, Inc. All rights reserved.
+ *
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License v.2.
+ */
+
#define EXTERN
#include "dlm_daemon.h"
#include <pthread.h>
diff --git a/dlm_controld/member_cman.c b/dlm_controld/member_cman.c
index 909c249..41af911 100644
--- a/dlm_controld/member_cman.c
+++ b/dlm_controld/member_cman.c
@@ -1,3 +1,11 @@
+/*
+ * Copyright (C) 2004-2011 Red Hat, Inc. All rights reserved.
+ *
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License v.2.
+ */
+
#include "dlm_daemon.h"
#include <corosync/corotypes.h>
#include <corosync/cfg.h>
diff --git a/dlm_controld/netlink.c b/dlm_controld/netlink.c
index 9f1d382..06b6312 100644
--- a/dlm_controld/netlink.c
+++ b/dlm_controld/netlink.c
@@ -1,3 +1,11 @@
+/*
+ * Copyright (C) 2004-2011 Red Hat, Inc. All rights reserved.
+ *
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License v.2.
+ */
+
#include "dlm_daemon.h"
#include <linux/dlm.h>
#include <linux/netlink.h>
diff --git a/dlm_controld/plock.c b/dlm_controld/plock.c
index c38b998..4b66904 100644
--- a/dlm_controld/plock.c
+++ b/dlm_controld/plock.c
@@ -1,3 +1,11 @@
+/*
+ * Copyright (C) 2004-2011 Red Hat, Inc. All rights reserved.
+ *
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License v.2.
+ */
+
#include "dlm_daemon.h"
#include <linux/dlm_plock.h>
diff --git a/dlm_tool/main.c b/dlm_tool/main.c
index 55593c0..3523cce 100644
--- a/dlm_tool/main.c
+++ b/dlm_tool/main.c
@@ -1,3 +1,11 @@
+/*
+ * Copyright (C) 2004-2011 Red Hat, Inc. All rights reserved.
+ *
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License v.2.
+ */
+
#include <unistd.h>
#include <stdio.h>
#include <stdint.h>
diff --git a/libdlm/libdlm.c b/libdlm/libdlm.c
index a5157e2..134f5a7 100644
--- a/libdlm/libdlm.c
+++ b/libdlm/libdlm.c
@@ -1,3 +1,12 @@
+/*
+ * Copyright (C) 2004-2011 Red Hat, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ */
+
#ifdef _REENTRANT
#include <pthread.h>
#endif
diff --git a/libdlm/libdlm.h b/libdlm/libdlm.h
index 17a552c..6a30407 100644
--- a/libdlm/libdlm.h
+++ b/libdlm/libdlm.h
@@ -1,3 +1,12 @@
+/*
+ * Copyright (C) 2004-2011 Red Hat, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ */
+
#ifndef __LIBDLM_H
#define __LIBDLM_H
diff --git a/libdlm/libdlm_internal.h b/libdlm/libdlm_internal.h
index c8b270e..c8fded7 100644
--- a/libdlm/libdlm_internal.h
+++ b/libdlm/libdlm_internal.h
@@ -1,3 +1,11 @@
+/*
+ * Copyright (C) 2004-2011 Red Hat, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ */
/* Needed before we include the kernel libdlm header */
#define __user
Gitweb: http://git.fedorahosted.org/git/gfs2-utils.git?p=gfs2-utils.git;a=commitdif…
Commit: 5b2c8e2e8bd72d54da60f84bfc3e119826e0e610
Parent: b9236511fd2d579f89cb6eca3f8a556d86c739ae
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Wed Oct 5 00:18:17 2011 +0100
Committer: Andrew Price <anprice(a)redhat.com>
CommitterDate: Wed Oct 5 14:56:26 2011 +0100
libgfs2: Don't count sentinel dirent as an entry
dir_split_leaf() adds a sentinel dirent using dirent_alloc() which
increments di_entries in the directory dinode. Since sentinel dirents
aren't real directory entries, di_entries becomes too high in some
situations. This patch decrements di_entries after the sentinel dirent
is created to fix the discrepancy.
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
gfs2/libgfs2/fs_ops.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/gfs2/libgfs2/fs_ops.c b/gfs2/libgfs2/fs_ops.c
index ecd54ca..fe7fce6 100644
--- a/gfs2/libgfs2/fs_ops.c
+++ b/gfs2/libgfs2/fs_ops.c
@@ -953,6 +953,8 @@ static void dir_split_leaf(struct gfs2_inode *dip, uint32_t lindex,
if (dirent_alloc(dip, nbh, 0, &new))
die("dir_split_leaf (4)\n");
new->de_inum.no_formal_ino = 0;
+ /* Don't count the sentinel dirent as an entry */
+ dip->i_di.di_entries--;
}
oleaf->lf_depth = be16_to_cpu(oleaf->lf_depth) + 1;