All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Price <anprice@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 12/18] libgfs2: Move debugging printf out of build_root()
Date: Wed, 12 Jan 2022 19:26:44 +0000	[thread overview]
Message-ID: <20220112192650.1426415-13-anprice@redhat.com> (raw)
In-Reply-To: <20220112192650.1426415-1-anprice@redhat.com>

mkfs.gfs2 is the only place it could ever get printed so move it there
instead.

Signed-off-by: Andrew Price <anprice@redhat.com>
---
 gfs2/libgfs2/structures.c | 4 ----
 gfs2/mkfs/main_mkfs.c     | 4 ++++
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/gfs2/libgfs2/structures.c b/gfs2/libgfs2/structures.c
index 6cc0a8dd..7ac38f92 100644
--- a/gfs2/libgfs2/structures.c
+++ b/gfs2/libgfs2/structures.c
@@ -450,10 +450,6 @@ int build_root(struct gfs2_sbd *sdp)
 	if (sdp->md.rooti == NULL)
 		return -1;
 
-	if (cfg_debug) {
-		printf("\nRoot directory:\n");
-		lgfs2_dinode_print(bh->b_data);
-	}
 	sdp->md.rooti->bh_owned = 1;
 	return 0;
 }
diff --git a/gfs2/mkfs/main_mkfs.c b/gfs2/mkfs/main_mkfs.c
index 56a3b7d2..9a73ff7b 100644
--- a/gfs2/mkfs/main_mkfs.c
+++ b/gfs2/mkfs/main_mkfs.c
@@ -1343,6 +1343,10 @@ int main(int argc, char *argv[])
 		printf("%s", _("Done\n"));
 
 	build_root(&sbd);
+	if (opts.debug) {
+		printf("\nRoot directory:\n");
+		lgfs2_dinode_print(sbd.md.rooti->i_bh->b_data);
+	}
 	sbd.sd_root_dir = sbd.md.rooti->i_num;
 
 	strncpy(sbd.sd_lockproto, opts.lockproto, GFS2_LOCKNAME_LEN - 1);
-- 
2.34.1



  parent reply	other threads:[~2022-01-12 19:26 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-12 19:26 [Cluster-devel] [PATCH 00/18] gfs2-utils: Don't require an external print_it() in libgfs2 Andrew Price
2022-01-12 19:26 ` [Cluster-devel] [PATCH 01/18] libgfs2: Move debugging printf out of build_master() Andrew Price
2022-01-12 19:26 ` [Cluster-devel] [PATCH 02/18] libgfs2: Rework lgfs2_build_jindex() Andrew Price
2022-01-12 19:26 ` [Cluster-devel] [PATCH 03/18] libgfs2: Move build_jindex() into fsck.gfs2 Andrew Price
2022-01-12 19:26 ` [Cluster-devel] [PATCH 04/18] libgfs2: Push down build_per_node() into the utils Andrew Price
2022-01-12 19:26 ` [Cluster-devel] [PATCH 05/18] libgfs2: Return the inode from build_inum_range() Andrew Price
2022-01-12 19:26 ` [Cluster-devel] [PATCH 06/18] libgfs2: Return the inode from build_statfs_change() Andrew Price
2022-01-12 19:26 ` [Cluster-devel] [PATCH 07/18] libgfs2: Return the inode from build_quota_change() Andrew Price
2022-01-12 19:26 ` [Cluster-devel] [PATCH 08/18] libgfs2: Return the inode from build_inum() Andrew Price
2022-01-12 19:26 ` [Cluster-devel] [PATCH 09/18] libgfs2: Return the inode from build_statfs() Andrew Price
2022-01-12 19:26 ` [Cluster-devel] [PATCH 10/18] libgfs2: Return the inode from build_rindex() Andrew Price
2022-01-12 19:26 ` [Cluster-devel] [PATCH 11/18] libgfs2: Return the inode from build_quota() Andrew Price
2022-01-12 19:26 ` Andrew Price [this message]
2022-01-12 19:26 ` [Cluster-devel] [PATCH 13/18] libgfs2: Remove debugging printf from do_init_statfs() Andrew Price
2022-01-12 19:26 ` [Cluster-devel] [PATCH 14/18] libgfs2: Move debugging output out of do_init_inum() Andrew Price
2022-01-12 19:26 ` [Cluster-devel] [PATCH 15/18] libgfs2: Remove debugging printfs from fix_device_geometry() Andrew Price
2022-01-12 19:26 ` [Cluster-devel] [PATCH 16/18] libgfs2: Remove config.[ch] Andrew Price
2022-01-12 19:26 ` [Cluster-devel] [PATCH 17/18] libgfs2: Move struct printing functions out of libgfs2 Andrew Price
2022-01-12 19:26 ` [Cluster-devel] [PATCH 18/18] libgfs2: Remove print_it extern requirement 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=20220112192650.1426415-13-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.