Gitweb: http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=8e0b0c05b02... Commit: 8e0b0c05b026ec6d3248c9c264cb02723c1f4a8b Parent: c291aa2f413b70f2ad25d01edb9aacfbd7d1a5b6 Author: Andrew Price anprice@redhat.com AuthorDate: Wed Feb 3 14:47:40 2016 +0000 Committer: Andrew Price anprice@redhat.com CommitterDate: Wed Feb 3 14:47:40 2016 +0000
gfs2_edit: Don't use the global block variable in block_is_jindex
Accept it as an argument instead.
Signed-off-by: Andrew Price anprice@redhat.com --- gfs2/edit/extended.c | 2 +- gfs2/edit/hexedit.c | 9 +++------ gfs2/edit/hexedit.h | 2 +- gfs2/edit/savemeta.c | 2 +- 4 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/gfs2/edit/extended.c b/gfs2/edit/extended.c index c01427f..b9d77f8 100644 --- a/gfs2/edit/extended.c +++ b/gfs2/edit/extended.c @@ -684,7 +684,7 @@ int display_extended(void) parse_rindex(tmp_inode, FALSE); inode_put(&tmp_inode); brelse(tmp_bh); - } else if (block_is_jindex()) { + } else if (block_is_jindex(block)) { tmp_bh = bread(&sbd, block); tmp_inode = lgfs2_inode_get(&sbd, tmp_bh); if (tmp_inode == NULL) diff --git a/gfs2/edit/hexedit.c b/gfs2/edit/hexedit.c index 70406df..cf13304 100644 --- a/gfs2/edit/hexedit.c +++ b/gfs2/edit/hexedit.c @@ -890,12 +890,9 @@ int block_is_rindex(void) return FALSE; }
-/* ------------------------------------------------------------------------ */ -/* block_is_jindex */ -/* ------------------------------------------------------------------------ */ -int block_is_jindex(void) +int block_is_jindex(uint64_t blk) { - if ((sbd.gfs1 && block == sbd1->sb_jindex_di.no_addr)) + if ((sbd.gfs1 && blk == sbd1->sb_jindex_di.no_addr)) return TRUE; return FALSE; } @@ -953,7 +950,7 @@ static int block_has_extended_info(void) block_is_rindex() || block_is_rgtree() || block_is_journals() || - block_is_jindex() || + block_is_jindex(block) || block_is_inum_file() || block_is_statfs_file() || block_is_quota_file()) diff --git a/gfs2/edit/hexedit.h b/gfs2/edit/hexedit.h index 3e9ff5f..745e026 100644 --- a/gfs2/edit/hexedit.h +++ b/gfs2/edit/hexedit.h @@ -218,7 +218,7 @@ void die(const char *fmt, ...) } \ } while (0)
-extern int block_is_jindex(void); +extern int block_is_jindex(uint64_t blk); extern int block_is_rindex(void); extern int block_is_inum_file(void); extern int block_is_statfs_file(void); diff --git a/gfs2/edit/savemeta.c b/gfs2/edit/savemeta.c index 196e2f4..dc2c3d7 100644 --- a/gfs2/edit/savemeta.c +++ b/gfs2/edit/savemeta.c @@ -166,7 +166,7 @@ static int init_per_node_lookup(void)
static int block_is_systemfile(void) { - return block_is_jindex() || block_is_inum_file() || + return block_is_jindex(block) || block_is_inum_file() || block_is_statfs_file() || block_is_quota_file() || block_is_rindex() || block_is_a_journal(block) || block_is_per_node() || block_is_in_per_node(block);