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 12-21-2011, 01:12 PM
Steven Whitehouse
 
Default libgfs2: Remove struct gfs_rindex from header, etc

>From 68d716d56f92c413303ac5923ae9b720a6817413 Mon Sep 17 00:00:00 2001
From: Steven Whitehouse <swhiteho@redhat.com>
Date: Wed, 21 Dec 2011 14:09:03 +0000
Subject: [PATCH] libgfs2: Remove struct gfs_rindex from header, etc

Since struct gfs_rindex is identical to gfs2_rindex, we don't
really need two structures. It was used in two places. Once
to define an unused member of a union with a gfs2_rindex and
once to define a buffer size (which I think was a mistake anyway
since the buffer contains a struct gfs2_rindex anyway.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>

diff --git a/gfs2/edit/extended.c b/gfs2/edit/extended.c
index a6e4139..7fd770f 100644
--- a/gfs2/edit/extended.c
+++ b/gfs2/edit/extended.c
@@ -500,7 +500,7 @@ static int parse_rindex(struct gfs2_inode *dip, int print_rindex)
{
int error, start_line;
struct gfs2_rindex ri;
- char rbuf[sizeof(struct gfs_rindex)];
+ char rbuf[sizeof(struct gfs2_rindex)];
char highlighted_addr[32];

start_line = line;
diff --git a/gfs2/libgfs2/libgfs2.h b/gfs2/libgfs2/libgfs2.h
index 4f26e3e..1a64cb8 100644
--- a/gfs2/libgfs2/libgfs2.h
+++ b/gfs2/libgfs2/libgfs2.h
@@ -579,19 +579,6 @@ struct gfs_log_header {
char lh_reserved[64];
};

-struct gfs_rindex {
- uint64_t ri_addr; /* block # of 1st block (header) in rgrp */
- uint32_t ri_length; /* # fs blocks containing rgrp header & bitmap */
- uint32_t ri_pad;
-
- uint64_t ri_data1; /* block # of first data/meta block in rgrp */
- uint32_t ri_data; /* number (qty) of data/meta blocks in rgrp */
-
- uint32_t ri_bitbytes; /* total # bytes used by block alloc bitmap */
-
- char ri_reserved[64];
-};
-
struct gfs_jindex {
uint64_t ji_addr; /* starting block of the journal */
uint32_t ji_nsegment; /* number (quantity) of segments in journal */
diff --git a/gfs2/libgfs2/super.c b/gfs2/libgfs2/super.c
index 37152c2..a3c1964 100644
--- a/gfs2/libgfs2/super.c
+++ b/gfs2/libgfs2/super.c
@@ -135,7 +135,6 @@ int rindex_read(struct gfs2_sbd *sdp, int fd, int *count1, int *sane)
unsigned int rg;
int error;
union {
- struct gfs_rindex bufgfs1;
struct gfs2_rindex bufgfs2;
} buf;
struct gfs2_rindex ri;
--
1.7.4.4
 

Thread Tools




All times are GMT. The time now is 05:09 AM.

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