This is the mail archive of the cluster-cvs@sourceware.org mailing list for the cluster.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

cluster: RHEL5 - Grab hold of journal-turned-RG buffers so they'renot freed.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]