cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Andrew Price <anprice@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 04/23] gfs2_edit: Don't use the global block variable in block_is_inum_file
Date: Thu,  4 Feb 2016 11:20:15 +0000	[thread overview]
Message-ID: <1454584834-32412-5-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/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 b9d77f8..8c7244b 100644
--- a/gfs2/edit/extended.c
+++ b/gfs2/edit/extended.c
@@ -693,7 +693,7 @@ int display_extended(void)
 		inode_put(&tmp_inode);
 		brelse(tmp_bh);
 	}
-	else if (block_is_inum_file()) {
+	else if (block_is_inum_file(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 cf13304..6125d04 100644
--- a/gfs2/edit/hexedit.c
+++ b/gfs2/edit/hexedit.c
@@ -897,12 +897,9 @@ int block_is_jindex(uint64_t blk)
 	return FALSE;
 }
 
-/* ------------------------------------------------------------------------ */
-/* block_is_inum_file                                                       */
-/* ------------------------------------------------------------------------ */
-int block_is_inum_file(void)
+int block_is_inum_file(uint64_t blk)
 {
-	if (!sbd.gfs1 && block == masterblock("inum"))
+	if (!sbd.gfs1 && blk == masterblock("inum"))
 		return TRUE;
 	return FALSE;
 }
@@ -951,7 +948,7 @@ static int block_has_extended_info(void)
 	    block_is_rgtree() ||
 	    block_is_journals() ||
 	    block_is_jindex(block) ||
-	    block_is_inum_file() ||
+	    block_is_inum_file(block) ||
 	    block_is_statfs_file() ||
 	    block_is_quota_file())
 		return TRUE;
diff --git a/gfs2/edit/hexedit.h b/gfs2/edit/hexedit.h
index 745e026..f229ed4 100644
--- a/gfs2/edit/hexedit.h
+++ b/gfs2/edit/hexedit.h
@@ -220,7 +220,7 @@ void die(const char *fmt, ...)
 
 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_inum_file(uint64_t blk);
 extern int block_is_statfs_file(void);
 extern int block_is_quota_file(void);
 extern int block_is_per_node(void);
diff --git a/gfs2/edit/savemeta.c b/gfs2/edit/savemeta.c
index dc2c3d7..ab4fe0e 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) || block_is_inum_file() ||
+	return block_is_jindex(block) || block_is_inum_file(block) ||
 		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);
-- 
2.4.3



  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 ` Andrew Price [this message]
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 ` [Cluster-devel] [PATCH 08/23] gfs2_edit: Don't use the global block variable in block_is_per_node Andrew Price
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-5-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).