public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* cluster: RHEL5 - Grab hold of journal-turned-RG buffers so they're not freed.
@ 2008-12-12 20:07 Bob Peterson
0 siblings, 0 replies; only message in thread
From: Bob Peterson @ 2008-12-12 20:07 UTC (permalink / raw)
To: cluster-cvs-relay
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-12-12 20:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-12 20:07 cluster: RHEL5 - Grab hold of journal-turned-RG buffers so they're not freed Bob Peterson
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).