FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Cluster Development

 
 
LinkBack Thread Tools
 
Old 09-02-2011, 08:42 PM
Carlos Maiolino
 
Default libgfs2: fix compute_rgrp_layout

The function uses the same buggy trick as
gfs2_grow to calculate rgsize, which cause
a segmentation fault if there is only one
RG into the filesystem.
This patch makes compute_rgrp_layout() to
use figure_out_rgsize() function.

Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
---
gfs2/libgfs2/fs_geometry.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/gfs2/libgfs2/fs_geometry.c b/gfs2/libgfs2/fs_geometry.c
index 2b70f11..bdc8225 100644
--- a/gfs2/libgfs2/fs_geometry.c
+++ b/gfs2/libgfs2/fs_geometry.c
@@ -80,8 +80,8 @@ void compute_rgrp_layout(struct gfs2_sbd *sdp, struct osi_root *rgtree,
struct device *dev;
struct rgrp_tree *rl, *rlast = NULL, *rlast2 = NULL;
struct osi_node *n, *next = NULL;
- unsigned int rgrp = 0, nrgrp;
- uint64_t rglength, rgaddr;
+ unsigned int rgrp = 0, nrgrp, rglength;
+ uint64_t rgaddr;

sdp->new_rgrps = 0;
dev = &sdp->device;
@@ -113,7 +113,7 @@ void compute_rgrp_layout(struct gfs2_sbd *sdp, struct osi_root *rgtree,
rlast = rl;
}
rlast->start = rlast->ri.ri_addr;
- rglength = rlast->ri.ri_addr - rlast2->ri.ri_addr;
+ rglength = figure_out_rgsize(sdp);
rlast->length = rglength;
old_length = rlast->ri.ri_addr + rglength;
new_chunk = dev->length - old_length;
--
1.7.6
 

Thread Tools




All times are GMT. The time now is 03:25 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org