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: RHEL5 - Grab hold of journal-turned-RG buffers so they're not freed.
Date: Fri, 12 Dec 2008 20:07:00 -0000	[thread overview]
Message-ID: <20081212200630.9E2D9C024D@lists.fedorahosted.org> (raw)

Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=3e1c8fac2bf8eeb113628a621a2e3724ee0302c3
Commit:        3e1c8fac2bf8eeb113628a621a2e3724ee0302c3
Parent:        3d06a50da2541c94027392e39863fa61ac5f0214
Author:        Bob Peterson <rpeterso@redhat.com>
AuthorDate:    Fri Dec 12 13:56:35 2008 -0600
Committer:     Bob Peterson <rpeterso@redhat.com>
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


                 reply	other threads:[~2008-12-12 20:07 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=20081212200630.9E2D9C024D@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).