From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4213 invoked by alias); 27 Mar 2009 15:47:27 -0000 Received: (qmail 4207 invoked by alias); 27 Mar 2009 15:47:25 -0000 X-SWARE-Spam-Status: No, hits=-1.1 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS X-Spam-Status: No, hits=-1.1 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS X-Spam-Check-By: sourceware.org X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bastion.fedora.phx.redhat.com Subject: cluster: RHEL4 - Revert part of 455696 that caused "stuck in gfs_releasepage()" To: cluster-cvs-relay@redhat.com X-Project: Cluster Project X-Git-Module: cluster.git X-Git-Refname: refs/heads/RHEL4 X-Git-Reftype: branch X-Git-Oldrev: a29c355fd013ed1cd34e668e8a12a60ae4f89cfd X-Git-Newrev: 326a78dbfc416963ce9531e6acc8b9f291d190b4 From: Bob Peterson Message-Id: <20090327154703.6B8C0120150@lists.fedorahosted.org> Date: Fri, 27 Mar 2009 15:47:00 -0000 X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 Mailing-List: contact cluster-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cluster-cvs-owner@sourceware.org X-SW-Source: 2009-q1/txt/msg00927.txt.bz2 Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=326a78dbfc416963ce9531e6acc8b9f291d190b4 Commit: 326a78dbfc416963ce9531e6acc8b9f291d190b4 Parent: a29c355fd013ed1cd34e668e8a12a60ae4f89cfd Author: Bob Peterson AuthorDate: Fri Mar 27 10:36:15 2009 -0500 Committer: Bob Peterson 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);*/