public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* cluster: RHEL47 - Revert part of 455696 that caused "stuck in gfs_releasepage()"
@ 2009-03-27 15:52 Bob Peterson
  0 siblings, 0 replies; only message in thread
From: Bob Peterson @ 2009-03-27 15:52 UTC (permalink / raw)
  To: cluster-cvs-relay

Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=6ed0b5c680aa7039ae36f072b621caa3f8b83c96
Commit:        6ed0b5c680aa7039ae36f072b621caa3f8b83c96
Parent:        e8dad1b073b1d40fe0beeb7ecae751175807a396
Author:        Bob Peterson <rpeterso@redhat.com>
AuthorDate:    Fri Mar 27 10:36:15 2009 -0500
Committer:     Bob Peterson <rpeterso@redhat.com>
CommitterDate: Fri Mar 27 10:50:50 2009 -0500

Revert part of 455696 that caused "stuck in gfs_releasepage()"

bz 455696

As part of the 455696 patch, I changed a small section
of code relating to gfs_aspace_releasepage.  As a result
of that change, I could recreate "stuck in gfs_releasepage()"
messages by doing a dd from /dev/zero to gfs, at least
if the statfs_fast tuneable was set.  This patch reverts
that section of the patch and fixes the problem.
---
 gfs-kernel/src/gfs/dio.c |   17 +++++++++++------
 gfs-kernel/src/gfs/log.c |    3 +++
 2 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/gfs-kernel/src/gfs/dio.c b/gfs-kernel/src/gfs/dio.c
index 413ee8f..595ad57 100644
--- a/gfs-kernel/src/gfs/dio.c
+++ b/gfs-kernel/src/gfs/dio.c
@@ -159,14 +159,19 @@ gfs_aspace_releasepage(struct page *page, int gfp_mask)
 		t = jiffies;
 
 		while (atomic_read(&bh->b_count)) {
-			if (time_after_eq(jiffies, t +
-					  gfs_tune_get(sdp,
-						       gt_stall_secs) * HZ)) {
-				stuck_releasepage(bh);
-				t = jiffies;
+			if (atomic_read(&aspace->i_writecount)) {
+				if (time_after_eq(jiffies,t +
+						  gfs_tune_get(sdp,
+							gt_stall_secs) * HZ)) {
+					stuck_releasepage(bh);
+					t = jiffies;
+				}
+
+				yield();
+				continue;
 			}
 
-			yield();
+			return 0;
 		}
 
 		bd = bh2bd(bh);
diff --git a/gfs-kernel/src/gfs/log.c b/gfs-kernel/src/gfs/log.c
index cbcd02b..a79e154 100644
--- a/gfs-kernel/src/gfs/log.c
+++ b/gfs-kernel/src/gfs/log.c
@@ -1085,12 +1085,15 @@ ail_empty_gl(struct gfs_glock *gl)
 void
 gfs_inval_buf(struct gfs_glock *gl)
 {
+	struct inode *aspace = gl->gl_aspace;
 	struct address_space *mapping = gl->gl_aspace->i_mapping;
 
 	/*down(&gl->gl_sbd->sd_log_flush_lock);*/
 	ail_empty_gl(gl);
 
+	atomic_inc(&aspace->i_writecount);
 	truncate_inode_pages(mapping, 0);
+	atomic_dec(&aspace->i_writecount);
 
 	gfs_assert_withdraw(gl->gl_sbd, !mapping->nrpages);
 	/*up(&gl->gl_sbd->sd_log_flush_lock);*/


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

only message in thread, other threads:[~2009-03-27 15:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-27 15:52 cluster: RHEL47 - Revert part of 455696 that caused "stuck in gfs_releasepage()" 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).