This is an automated email from the git hooks/post-receive script.
andyp pushed a commit to branch andyp-sparse
in repository gfs2-utils.
commit 708154bf81a7cc557a0779db8c2432677a703ad3
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Mon May 10 14:28:15 2021 +0100
libgfs2: Remove gfs2_dinode_print()
Convert users to lgfs2_dinode_print() except the one in mkfs.gfs2 as we
don't have a big-endian dinode easily available. That one will be added
back once ip.i_di endianness mismatches have been resolved.
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
gfs2/libgfs2/libgfs2.h | 1 -
gfs2/libgfs2/ondisk.c | 30 ------------------------------
gfs2/libgfs2/structures.c | 22 +++++++++++-----------
gfs2/mkfs/main_mkfs.c | 3 ---
4 files changed, 11 insertions(+), 45 deletions(-)
diff --git a/gfs2/libgfs2/libgfs2.h b/gfs2/libgfs2/libgfs2.h
index 2c4b856e..feace819 100644
--- a/gfs2/libgfs2/libgfs2.h
+++ b/gfs2/libgfs2/libgfs2.h
@@ -729,7 +729,6 @@ extern void gfs2_leaf_out(struct gfs2_leaf *lf, char *buf);
extern void gfs2_inum_print(const struct gfs2_inum *no);
extern void gfs2_meta_header_print(const struct gfs2_meta_header *mh);
extern void gfs2_rindex_print(const struct gfs2_rindex *ri);
-extern void gfs2_dinode_print(const struct gfs2_dinode *di);
/* These expect on-disk data instead of native-endian structs */
extern void lgfs2_inum_print(void *nop);
extern void lgfs2_meta_header_print(void *mhp);
diff --git a/gfs2/libgfs2/ondisk.c b/gfs2/libgfs2/ondisk.c
index 0387f196..1dcfd7c4 100644
--- a/gfs2/libgfs2/ondisk.c
+++ b/gfs2/libgfs2/ondisk.c
@@ -354,36 +354,6 @@ void gfs2_dinode_out(struct gfs2_dinode *di, char *buf)
CPOUT_08(di, str, di_reserved, 32);
}
-void gfs2_dinode_print(const struct gfs2_dinode *di)
-{
- gfs2_meta_header_print(&di->di_header);
- gfs2_inum_print(&di->di_num);
-
- pv(di, di_mode, "0%"PRIo32, NULL);
- pv(di, di_uid, "%"PRIu32, "0x%"PRIx32);
- pv(di, di_gid, "%"PRIu32, "0x%"PRIx32);
- pv(di, di_nlink, "%"PRIu32, "0x%"PRIx32);
- pv(di, di_size, "%"PRIu64, "0x%"PRIx64);
- pv(di, di_blocks, "%"PRIu64, "0x%"PRIx64);
- pv(di, di_atime, "%"PRIu64, "0x%"PRIx64);
- pv(di, di_mtime, "%"PRIu64, "0x%"PRIx64);
- pv(di, di_ctime, "%"PRIu64, "0x%"PRIx64);
- pv(di, di_major, "%"PRIu32, "0x%"PRIx32);
- pv(di, di_minor, "%"PRIu32, "0x%"PRIx32);
-
- pv(di, di_goal_meta, "%"PRIu64, "0x%"PRIx64);
- pv(di, di_goal_data, "%"PRIu64, "0x%"PRIx64);
-
- pv(di, di_flags, "0x%.8"PRIX32, NULL);
- pv(di, di_payload_format, "%"PRIu32, "0x%"PRIx32);
- pv(di, di_height, "%"PRIu16, "0x%"PRIx16);
-
- pv(di, di_depth, "%"PRIu16, "0x%"PRIx16);
- pv(di, di_entries, "%"PRIu32, "0x%"PRIx32);
-
- pv(di, di_eattr, "%"PRIu64, "0x%"PRIx64);
-}
-
void lgfs2_dinode_print(void *dip)
{
struct gfs2_dinode *di = dip;
diff --git a/gfs2/libgfs2/structures.c b/gfs2/libgfs2/structures.c
index 4ef4e685..d70aeaef 100644
--- a/gfs2/libgfs2/structures.c
+++ b/gfs2/libgfs2/structures.c
@@ -40,7 +40,7 @@ int build_master(struct gfs2_sbd *sdp)
if (cfg_debug) {
printf("\nMaster dir:\n");
- gfs2_dinode_print(&sdp->master_dir->i_di);
+ lgfs2_dinode_print(bh->b_data);
}
sdp->master_dir->bh_owned = 1;
return 0;
@@ -299,7 +299,7 @@ int lgfs2_build_jindex(struct gfs2_inode *master, struct gfs2_inum
*jnls, size_t
if (cfg_debug) {
printf("\nJindex:\n");
- gfs2_dinode_print(&jindex->i_di);
+ lgfs2_dinode_print(jindex->i_bh->b_data);
}
inode_put(&jindex);
@@ -327,7 +327,7 @@ int build_jindex(struct gfs2_sbd *sdp)
}
if (cfg_debug) {
printf("\nJindex:\n");
- gfs2_dinode_print(&jindex->i_di);
+ lgfs2_dinode_print(jindex->i_bh->b_data);
}
free(sdp->md.journal);
@@ -351,7 +351,7 @@ int build_inum_range(struct gfs2_inode *per_node, unsigned int j)
bmodified(ip->i_bh);
if (cfg_debug) {
printf("\nInum Range %u:\n", j);
- gfs2_dinode_print(&ip->i_di);
+ lgfs2_dinode_print(ip->i_bh->b_data);
}
inode_put(&ip);
@@ -374,7 +374,7 @@ int build_statfs_change(struct gfs2_inode *per_node, unsigned int j)
bmodified(ip->i_bh);
if (cfg_debug) {
printf("\nStatFS Change %u:\n", j);
- gfs2_dinode_print(&ip->i_di);
+ lgfs2_dinode_print(ip->i_bh->b_data);
}
inode_put(&ip);
@@ -419,7 +419,7 @@ int build_quota_change(struct gfs2_inode *per_node, unsigned int j)
if (cfg_debug) {
printf("\nQuota Change %u:\n", j);
- gfs2_dinode_print(&ip->i_di);
+ lgfs2_dinode_print(ip->i_bh->b_data);
}
inode_put(&ip);
@@ -455,7 +455,7 @@ int build_per_node(struct gfs2_sbd *sdp)
if (cfg_debug) {
printf("\nper_node:\n");
- gfs2_dinode_print(&per_node->i_di);
+ lgfs2_dinode_print(per_node->i_bh->b_data);
}
inode_put(&per_node);
@@ -474,7 +474,7 @@ int build_inum(struct gfs2_sbd *sdp)
if (cfg_debug) {
printf("\nInum Inode:\n");
- gfs2_dinode_print(&ip->i_di);
+ lgfs2_dinode_print(ip->i_bh->b_data);
}
inode_put(&ip);
@@ -493,7 +493,7 @@ int build_statfs(struct gfs2_sbd *sdp)
if (cfg_debug) {
printf("\nStatFS Inode:\n");
- gfs2_dinode_print(&ip->i_di);
+ lgfs2_dinode_print(ip->i_bh->b_data);
}
inode_put(&ip);
@@ -535,7 +535,7 @@ int build_rindex(struct gfs2_sbd *sdp)
if (cfg_debug) {
printf("\nResource Index:\n");
- gfs2_dinode_print(&ip->i_di);
+ lgfs2_dinode_print(ip->i_bh->b_data);
}
inode_put(&ip);
@@ -598,7 +598,7 @@ int build_root(struct gfs2_sbd *sdp)
if (cfg_debug) {
printf("\nRoot directory:\n");
- gfs2_dinode_print(&sdp->md.rooti->i_di);
+ 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 2400cc8e..19b248d2 100644
--- a/gfs2/mkfs/main_mkfs.c
+++ b/gfs2/mkfs/main_mkfs.c
@@ -877,9 +877,6 @@ static int place_journals(struct gfs2_sbd *sdp, lgfs2_rgrps_t rgs,
struct mkfs_o
return result;
}
- if (opts->debug)
- gfs2_dinode_print(&in.i_di);
-
result = place_rgrp(sdp, rg, opts->debug);
if (result != 0)
return result;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.