From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20256 invoked by alias); 17 Apr 2009 13:27:41 -0000 Received: (qmail 20249 invoked by alias); 17 Apr 2009 13:27:40 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS X-Spam-Status: No, hits=-1.3 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 bastion2.fedora.phx.redhat.com Subject: cluster: RHEL47 - Fix hang due to gfs_log_dump. To: cluster-cvs-relay@redhat.com X-Project: Cluster Project X-Git-Module: cluster.git X-Git-Refname: refs/heads/RHEL47 X-Git-Reftype: branch X-Git-Oldrev: 6ed0b5c680aa7039ae36f072b621caa3f8b83c96 X-Git-Newrev: 90b5ce10f93bf97caa9d8076302488120aa28e4a From: Bob Peterson Message-Id: <20090417132714.53B7D12026B@lists.fedorahosted.org> Date: Fri, 17 Apr 2009 13:27: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-q2/txt/msg00076.txt.bz2 Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=90b5ce10f93bf97caa9d8076302488120aa28e4a Commit: 90b5ce10f93bf97caa9d8076302488120aa28e4a Parent: 6ed0b5c680aa7039ae36f072b621caa3f8b83c96 Author: Bob Peterson AuthorDate: Wed Apr 15 13:22:21 2009 -0500 Committer: Bob Peterson 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); } /**