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 10/23] gfs2_edit: Don't use the global block variable in block_is_rgtree
Date: Thu,  4 Feb 2016 11:20:21 +0000	[thread overview]
Message-ID: <1454584834-32412-11-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  | 2 +-
 gfs2/edit/hexedit.h  | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/gfs2/edit/extended.c b/gfs2/edit/extended.c
index a8a71e7..ced2412 100644
--- a/gfs2/edit/extended.c
+++ b/gfs2/edit/extended.c
@@ -673,7 +673,7 @@ int display_extended(void)
 		return -1;
 	else if (display_indirect(indirect, indirect_blocks, 0, 0) == 0)
 		return -1;
-	else if (block_is_rgtree()) {
+	else if (block_is_rgtree(block)) {
 		if (sbd.gfs1)
 			tmp_bh = bread(&sbd, sbd1->sb_rindex_di.no_addr);
 		else
diff --git a/gfs2/edit/hexedit.c b/gfs2/edit/hexedit.c
index 981c02c..b4123a1 100644
--- a/gfs2/edit/hexedit.c
+++ b/gfs2/edit/hexedit.c
@@ -933,7 +933,7 @@ static int block_has_extended_info(void)
 {
 	if (has_indirect_blocks() ||
 	    block_is_rindex(block) ||
-	    block_is_rgtree() ||
+	    block_is_rgtree(block) ||
 	    block_is_journals() ||
 	    block_is_jindex(block) ||
 	    block_is_inum_file(block) ||
diff --git a/gfs2/edit/hexedit.h b/gfs2/edit/hexedit.h
index f1f7667..1f97631 100644
--- a/gfs2/edit/hexedit.h
+++ b/gfs2/edit/hexedit.h
@@ -114,9 +114,9 @@ extern enum dsp_mode dmode;
 /*                   special case meant to parse the rindex and follow the  */
 /*                   blocks to the real rgs.                                */
 /* ------------------------------------------------------------------------ */
-static inline int block_is_rgtree(void)
+static inline int block_is_rgtree(uint64_t blk)
 {
-	if (block == RGLIST_DUMMY_BLOCK)
+	if (blk == RGLIST_DUMMY_BLOCK)
 		return TRUE;
 	return FALSE;
 }
-- 
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 ` [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 ` [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 ` Andrew Price [this message]
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-11-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).