From: Andrew Price <anprice@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 08/23] gfs2_edit: Don't use the global block variable in block_is_per_node
Date: Thu, 4 Feb 2016 11:20:19 +0000 [thread overview]
Message-ID: <1454584834-32412-9-git-send-email-anprice@redhat.com> (raw)
In-Reply-To: <1454584834-32412-1-git-send-email-anprice@redhat.com>
Accept it as an argument instead.
Signed-off-by: Andrew Price <anprice@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);
}
/**
--
2.4.3
next prev parent reply other threads:[~2016-02-04 11:20 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-04 11:20 [Cluster-devel] [PATCH 00/23] gfs2_edit: Code cleanups Andrew Price
2016-02-04 11:20 ` [Cluster-devel] [PATCH 01/23] gfs2_edit: Don't use the global block variable in block_is_a_journal Andrew Price
2016-02-04 11:20 ` [Cluster-devel] [PATCH 02/23] gfs2_edit: Don't use the global block variable in block_is_in_per_node Andrew Price
2016-02-04 11:20 ` [Cluster-devel] [PATCH 03/23] gfs2_edit: Don't use the global block variable in block_is_jindex Andrew Price
2016-02-04 11:20 ` [Cluster-devel] [PATCH 04/23] gfs2_edit: Don't use the global block variable in block_is_inum_file Andrew Price
2016-02-04 11:20 ` [Cluster-devel] [PATCH 05/23] gfs2_edit: Don't use global block variable in block_is_statfs_file Andrew Price
2016-02-04 11:20 ` [Cluster-devel] [PATCH 06/23] gfs2_edit: Don't use global block variable in block_is_quota_file Andrew Price
2016-02-04 11:20 ` [Cluster-devel] [PATCH 07/23] gfs2_edit: Don't use global block variable in block_is_rindex Andrew Price
2016-02-04 11:20 ` Andrew Price [this message]
2016-02-04 11:20 ` [Cluster-devel] [PATCH 09/23] gfs2_edit: Don't use the global block variable in block_is_systemfile Andrew Price
2016-02-04 11:20 ` [Cluster-devel] [PATCH 10/23] gfs2_edit: Don't use the global block variable in block_is_rgtree Andrew Price
2016-02-04 11:20 ` [Cluster-devel] [PATCH 11/23] gfs2_edit: Don't use the global block variable in block_is_journals Andrew Price
2016-02-04 11:20 ` [Cluster-devel] [PATCH 12/23] gfs2_edit: Only declare the block variable where needed Andrew Price
2016-02-04 11:20 ` [Cluster-devel] [PATCH 13/23] gfs2_edit: Don't use the global block variable in save_block Andrew Price
2016-02-04 11:20 ` [Cluster-devel] [PATCH 14/23] gfs2_edit: Don't use the global block variable in save_indirect_blocks Andrew Price
2016-02-04 11:20 ` [Cluster-devel] [PATCH 15/23] gfs2_edit: Don't use the global block variable in save_inode_data Andrew Price
2016-02-04 11:20 ` [Cluster-devel] [PATCH 16/23] gfs2_edit: Don't use the global block variable in get_gfs_struct_info Andrew Price
2016-02-04 11:20 ` [Cluster-devel] [PATCH 17/23] gfs2_edit: Don't use the global block variable in save_ea_block Andrew Price
2016-02-04 11:20 ` [Cluster-devel] [PATCH 18/23] gfs2_edit: Don't use the global block variable in save_allocated Andrew Price
2016-02-04 11:20 ` [Cluster-devel] [PATCH 19/23] gfs2_edit: Don't use the global block variable in savemeta Andrew Price
2016-02-04 11:20 ` [Cluster-devel] [PATCH 20/23] gfs2_edit: Don't use the global bh variable in display_block_type Andrew Price
2016-02-04 11:20 ` [Cluster-devel] [PATCH 21/23] gfs2_edit: Don't use the global block variable in savemeta.c Andrew Price
2016-02-04 11:20 ` [Cluster-devel] [PATCH 22/23] gfs2_edit: Don't export bh Andrew Price
2016-02-04 11:20 ` [Cluster-devel] [PATCH 23/23] gfs2_edit: Remove block_in_mem and fix a memory leak Andrew Price
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1454584834-32412-9-git-send-email-anprice@redhat.com \
--to=anprice@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).