Gitweb:
http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=6ce6f2b7...
Commit: 6ce6f2b7d7fadf2bb2ba7f864fcdfc2bd7e323e1
Parent: f7d2b1c56b4bd1299714ca2034f7d394019da477
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Wed Feb 3 15:05:14 2016 +0000
Committer: Andrew Price <anprice(a)redhat.com>
CommitterDate: Wed Feb 3 15:05:14 2016 +0000
gfs2_edit: Don't use the global block variable in block_is_per_node
Accept it as an argument instead.
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
gfs2/edit/hexedit.c | 7 ++-----
gfs2/edit/hexedit.h | 2 +-
gfs2/edit/savemeta.c | 2 +-
3 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/gfs2/edit/hexedit.c b/gfs2/edit/hexedit.c
index 7c85ca8..981c02c 100644
--- a/gfs2/edit/hexedit.c
+++ b/gfs2/edit/hexedit.c
@@ -919,12 +919,9 @@ int block_is_quota_file(uint64_t blk)
return FALSE;
}
-/* ------------------------------------------------------------------------ */
-/* block_is_per_node */
-/* ------------------------------------------------------------------------ */
-int block_is_per_node(void)
+int block_is_per_node(uint64_t blk)
{
- if (!sbd.gfs1 && block == masterblock("per_node"))
+ if (!sbd.gfs1 && blk == masterblock("per_node"))
return TRUE;
return FALSE;
}
diff --git a/gfs2/edit/hexedit.h b/gfs2/edit/hexedit.h
index 9607523..f1f7667 100644
--- a/gfs2/edit/hexedit.h
+++ b/gfs2/edit/hexedit.h
@@ -223,7 +223,7 @@ extern int block_is_rindex(uint64_t blk);
extern int block_is_inum_file(uint64_t blk);
extern int block_is_statfs_file(uint64_t blk);
extern int block_is_quota_file(uint64_t blk);
-extern int block_is_per_node(void);
+extern int block_is_per_node(uint64_t blk);
extern int display_block_type(int from_restore);
extern void gfs_jindex_in(struct gfs_jindex *jindex, char *buf);
extern void gfs_log_header_in(struct gfs_log_header *head,
diff --git a/gfs2/edit/savemeta.c b/gfs2/edit/savemeta.c
index 4483e4e..1899d9a 100644
--- a/gfs2/edit/savemeta.c
+++ b/gfs2/edit/savemeta.c
@@ -169,7 +169,7 @@ static int block_is_systemfile(void)
return block_is_jindex(block) || block_is_inum_file(block) ||
block_is_statfs_file(block) || block_is_quota_file(block) ||
block_is_rindex(block) || block_is_a_journal(block) ||
- block_is_per_node() || block_is_in_per_node(block);
+ block_is_per_node(block) || block_is_in_per_node(block);
}
/**