From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11656 invoked by alias); 12 Dec 2008 20:07:33 -0000 Received: (qmail 11649 invoked by alias); 12 Dec 2008 20:07:33 -0000 X-Spam-Level: * X-Spam-Status: No, hits=-1.0 required=5.0 tests=AWL,BAYES_00,KAM_MX,SPF_HELO_PASS X-Spam-Check-By: sourceware.org X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on bastion.fedora.phx.redhat.com Subject: cluster: RHEL5 - Grab hold of journal-turned-RG buffers so they're not freed. To: cluster-cvs-relay@redhat.com X-Project: Cluster Project X-Git-Module: cluster.git X-Git-Refname: refs/heads/RHEL5 X-Git-Reftype: branch X-Git-Oldrev: 3d06a50da2541c94027392e39863fa61ac5f0214 X-Git-Newrev: 3e1c8fac2bf8eeb113628a621a2e3724ee0302c3 From: Bob Peterson Message-Id: <20081212200630.9E2D9C024D@lists.fedorahosted.org> Date: Fri, 12 Dec 2008 20:07: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: 2008-q4/txt/msg00503.txt.bz2 Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=3e1c8fac2bf8eeb113628a621a2e3724ee0302c3 Commit: 3e1c8fac2bf8eeb113628a621a2e3724ee0302c3 Parent: 3d06a50da2541c94027392e39863fa61ac5f0214 Author: Bob Peterson AuthorDate: Fri Dec 12 13:56:35 2008 -0600 Committer: Bob Peterson CommitterDate: Fri Dec 12 14:07:00 2008 -0600 Grab hold of journal-turned-RG buffers so they're not freed. bz 471618 This is addendum patch 3 for bug 471618. The problem is, we weren't making a claim on buffers that used to be for the journals under GFS, but now are RG space for GFS2. So the buffer may go away especially when running gfs2_convert on a file system that's full. When the buffers are released at the end, they may not really exist any more, which caused a segfault. Grabbing hold of the buffer ensures they won't go away, so freeing them will work as normal. --- gfs2/convert/gfs2_convert.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/gfs2/convert/gfs2_convert.c b/gfs2/convert/gfs2_convert.c index 1bd4351..c57cc29 100644 --- a/gfs2/convert/gfs2_convert.c +++ b/gfs2/convert/gfs2_convert.c @@ -1373,6 +1373,7 @@ int journ_space_to_rg(struct gfs2_sbd *sdp) rgd->ri.ri_bitbytes = rgd->ri.ri_data / GFS2_NBBY; convert_bitmaps(sdp, rgd, FALSE); /* allocates rgd->bh */ for (x = 0; x < rgd->ri.ri_length; x++) { + rgd->bh[x]->b_count++; if (x) gfs2_meta_header_out(&mh, rgd->bh[x]->b_data); else