public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* cluster: RHEL47 - Fix hang due to gfs_log_dump.
@ 2009-04-17 13:27 Bob Peterson
  0 siblings, 0 replies; only message in thread
From: Bob Peterson @ 2009-04-17 13:27 UTC (permalink / raw)
  To: cluster-cvs-relay

Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=90b5ce10f93bf97caa9d8076302488120aa28e4a
Commit:        90b5ce10f93bf97caa9d8076302488120aa28e4a
Parent:        6ed0b5c680aa7039ae36f072b621caa3f8b83c96
Author:        Bob Peterson <rpeterso@redhat.com>
AuthorDate:    Wed Apr 15 13:22:21 2009 -0500
Committer:     Bob Peterson <rpeterso@redhat.com>
CommitterDate: Wed Apr 15 13:28:00 2009 -0500

Fix hang due to gfs_log_dump.

bz 495514

Since function gfs_log_dump can call gfs_log_reserve,
which can in turn call gfs_log_flush, we need to call it
outside of the relatively new sd_log_flush_lock.
---
 gfs-kernel/src/gfs/log.c |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/gfs-kernel/src/gfs/log.c b/gfs-kernel/src/gfs/log.c
index a79e154..63ad8c0 100644
--- a/gfs-kernel/src/gfs/log.c
+++ b/gfs-kernel/src/gfs/log.c
@@ -1031,11 +1031,6 @@ log_flush_internal(struct gfs_sbd *sdp, struct gfs_glock *gl)
 		sdp->sd_vfs->s_dirt = FALSE;
 
 	gfs_log_unlock(sdp);
-
-	/*  Dump if we need to.  */
-
-	if (test_bit(SDF_NEED_LOG_DUMP, &sdp->sd_flags))
-		gfs_log_dump(sdp, FALSE);
 }
 
 /**
@@ -1050,6 +1045,11 @@ gfs_log_flush(struct gfs_sbd *sdp)
 	down(&sdp->sd_log_flush_lock); /* unlocked in gfs_sync_buf */
 	log_flush_internal(sdp, NULL);
 	up(&sdp->sd_log_flush_lock); /* locked in log_flush_internal */
+
+	/*  Dump if we need to.  */
+
+	if (test_bit(SDF_NEED_LOG_DUMP, &sdp->sd_flags))
+		gfs_log_dump(sdp, FALSE);
 }
 
 /**
@@ -1140,6 +1140,11 @@ gfs_log_flush_glock(struct gfs_glock *gl, int flags)
 	if (flags)
 		gfs_sync_buf(gl, flags | DIO_CHECK);
 	up(&sdp->sd_log_flush_lock);
+
+	/*  Dump if we need to.  */
+
+	if (test_bit(SDF_NEED_LOG_DUMP, &sdp->sd_flags))
+		gfs_log_dump(sdp, FALSE);
 }
 
 /**


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-04-17 13:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-17 13:27 cluster: RHEL47 - Fix hang due to gfs_log_dump Bob Peterson

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).