public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* cluster: RHEL4 - dlm-kernel: fix2 prevent dlm module unload following emergency shutdown
@ 2009-02-04 21:14 David Teigland
0 siblings, 0 replies; only message in thread
From: David Teigland @ 2009-02-04 21:14 UTC (permalink / raw)
To: cluster-cvs-relay
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=e253ffddacd851318cacf777a0d95bee757ebd1e
Commit: e253ffddacd851318cacf777a0d95bee757ebd1e
Parent: 89a5f2ec8c20c252296e214cf60d32ad74e32a75
Author: David Teigland <teigland@redhat.com>
AuthorDate: Wed Feb 4 15:06:34 2009 -0600
Committer: David Teigland <teigland@redhat.com>
CommitterDate: Wed Feb 4 15:06:34 2009 -0600
dlm-kernel: fix2 prevent dlm module unload following emergency shutdown
bz 467040
It seems that dlm_emergency_shutdown() is called even when shutdowns are
normal/clean, but doesn't do anything. So, only do the __module_get()
if dlm_emergency_shutdown finds lockspaces to clear. Include the number
of lockspace's cleared in the printk at the end.
Signed-off-by: David Teigland <teigland@redhat.com>
---
dlm-kernel/src/lockspace.c | 19 +++++++++++--------
1 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/dlm-kernel/src/lockspace.c b/dlm-kernel/src/lockspace.c
index a7f78ef..b36fd02 100644
--- a/dlm-kernel/src/lockspace.c
+++ b/dlm-kernel/src/lockspace.c
@@ -601,16 +601,10 @@ void dlm_emergency_shutdown()
{
struct dlm_ls *ls;
struct dlm_ls *tmp;
+ int count = 0;
printk("WARNING: dlm_emergency_shutdown\n");
- /* prevent unloading since we cannot guarantee that slab
- * caches are empty here. This prevents a warning when our
- * module_exit tries to destroy the slab caches and
- * possible oopsen if something accesses /proc/slabinfo
- */
- __module_get(THIS_MODULE);
-
/* Shut lowcomms down to prevent any socket activity */
lowcomms_stop_accept();
@@ -621,15 +615,24 @@ void dlm_emergency_shutdown()
/* Now try to clean the lockspaces */
spin_lock(&lslist_lock);
+ /* prevent unloading since we cannot guarantee that slab
+ * caches are empty here. This prevents a warning when our
+ * module_exit tries to destroy the slab caches and
+ * possible oopsen if something accesses /proc/slabinfo
+ */
+ if (!list_empty(&lslist))
+ __module_get(THIS_MODULE);
+
list_for_each_entry_safe(ls, tmp, &lslist, ls_list) {
spin_unlock(&lslist_lock);
release_lockspace(ls, 3);
spin_lock(&lslist_lock);
+ count++;
}
spin_unlock(&lslist_lock);
- printk("WARNING: dlm_emergency_shutdown\n");
+ printk("WARNING: dlm_emergency_shutdown finished %d\n", count);
}
struct dlm_recover *allocate_dlm_recover(void)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-02-04 21:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-04 21:14 cluster: RHEL4 - dlm-kernel: fix2 prevent dlm module unload following emergency shutdown David Teigland
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).