public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
From: Bob Peterson <rpeterso@fedoraproject.org>
To: cluster-cvs-relay@redhat.com
Subject: cluster: RHEL4 - Revert part of 455696 that caused "stuck in gfs_releasepage()"
Date: Fri, 27 Mar 2009 15:47:00 -0000	[thread overview]
Message-ID: <20090327154703.6B8C0120150@lists.fedorahosted.org> (raw)

Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=326a78dbfc416963ce9531e6acc8b9f291d190b4
Commit:        326a78dbfc416963ce9531e6acc8b9f291d190b4
Parent:        a29c355fd013ed1cd34e668e8a12a60ae4f89cfd
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:36:15 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);*/


                 reply	other threads:[~2009-03-27 15:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090327154703.6B8C0120150@lists.fedorahosted.org \
    --to=rpeterso@fedoraproject.org \
    --cc=cluster-cvs-relay@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).