Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Cluster Development (http://www.linux-archive.org/cluster-development/)
-   -   gfs2_edit savemeta: save_inode_data backward for gfs1 (http://www.linux-archive.org/cluster-development/623194-gfs2_edit-savemeta-save_inode_data-backward-gfs1.html)

01-20-2012 02:10 PM

gfs2_edit savemeta: save_inode_data backward for gfs1
 
From: Bob Peterson <rpeterso@redhat.com>

The logic in "gfs2_edit savemeta" was wrong for saving inode blocks.
This patch fixes the logic.

rhbz#675723
---
gfs2/edit/savemeta.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/gfs2/edit/savemeta.c b/gfs2/edit/savemeta.c
index 665af07..8ccbf8a 100644
--- a/gfs2/edit/savemeta.c
+++ b/gfs2/edit/savemeta.c
@@ -121,9 +121,9 @@ static int get_gfs_struct_info(struct gfs2_buffer_head *lbh, int *block_type,
break;
case GFS2_METATYPE_DI: /* 4 (disk inode) */
if (sbd.gfs1)
- inode = inode_get(&sbd, lbh);
- else
inode = gfs_inode_get(&sbd, lbh);
+ else
+ inode = inode_get(&sbd, lbh);
if (S_ISDIR(inode->i_di.di_mode) ||
(sbd.gfs1 && inode->i_di.__pad1 == GFS_FILE_DIR))
*gstruct_len = sbd.bsize;
@@ -455,9 +455,9 @@ static void save_inode_data(struct metafd *mfd)
osi_list_init(&metalist[i]);
metabh = bread(&sbd, block);
if (sbd.gfs1)
- inode = inode_get(&sbd, metabh);
- else
inode = gfs_inode_get(&sbd, metabh);
+ else
+ inode = inode_get(&sbd, metabh);
height = inode->i_di.di_height;
/* If this is a user inode, we don't follow to the file height.
We stop one level less. That way we save off the indirect
--
1.7.7.5


All times are GMT. The time now is 02:33 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.