From: Andrew Price Date: Wed, 12 Jan 2022 19:26:33 +0000 Subject: [Cluster-devel] [PATCH 01/18] libgfs2: Move debugging printf out of build_master() In-Reply-To: <20220112192650.1426415-1-anprice@redhat.com> References: <20220112192650.1426415-1-anprice@redhat.com> Message-ID: <20220112192650.1426415-2-anprice@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit mkfs.gfs2 is the only place it could ever get printed so move it there instead. Signed-off-by: Andrew Price --- 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 a562dc50..95ad3ac9 100644 --- a/gfs2/libgfs2/structures.c +++ b/gfs2/libgfs2/structures.c @@ -38,10 +38,6 @@ int build_master(struct gfs2_sbd *sdp) if (sdp->master_dir == NULL) return -1; - if (cfg_debug) { - printf("\nMaster dir:\n"); - lgfs2_dinode_print(bh->b_data); - } sdp->master_dir->bh_owned = 1; return 0; } diff --git a/gfs2/mkfs/main_mkfs.c b/gfs2/mkfs/main_mkfs.c index 6f30b2d3..dbee5cab 100644 --- a/gfs2/mkfs/main_mkfs.c +++ b/gfs2/mkfs/main_mkfs.c @@ -1205,6 +1205,10 @@ int main(int argc, char *argv[]) fprintf(stderr, _("Error building '%s': %s\n"), "master", strerror(errno)); exit(EXIT_FAILURE); } + if (opts.debug) { + printf("Metafs inode:\n"); + lgfs2_dinode_print(sbd.master_dir->i_bh->b_data); + } sbd.sd_meta_dir = sbd.master_dir->i_num; error = lgfs2_build_jindex(sbd.master_dir, mkfs_journals, opts.journals); -- 2.34.1