[Ocfs2-tools-devel] [PATCH 09/12] debugfs.ocfs2: Dump the ocfs2_block_check structure (metaecc)
Joel Becker
Joel.Becker at oracle.com
Fri Jan 9 16:11:59 PST 2009
On Wed, Jan 07, 2009 at 05:52:50PM -0800, Sunil Mushran wrote:
> The crc/ecc may look better in hex. Also, I see no point in printing with
> N/A. As in, only print if enabled. Suggestions.
>
> Signed-off-by: Sunil Mushran <sunil.mushran at oracle.com>
The decision was to print them in hex, not matter what the
enabled feature set. Here's the diff:
>From aa31a29a139be084449c94498768e3b09ce452b2 Mon Sep 17 00:00:00 2001
From: Joel Becker <joel.becker at oracle.com>
Date: Thu, 8 Jan 2009 18:03:35 -0800
Subject: [PATCH 1/6] debugfs.ocfs2: Always print the crc/ecc fields.
Print the crc and ecc fields, even if the filesystem isn't using ECC.
Signed-off-by: Joel Becker <joel.becker at oracle.com>
---
debugfs.ocfs2/dump.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/debugfs.ocfs2/dump.c b/debugfs.ocfs2/dump.c
index 2cba747..43ff43e 100644
--- a/debugfs.ocfs2/dump.c
+++ b/debugfs.ocfs2/dump.c
@@ -160,12 +160,8 @@ void dump_fast_symlink (FILE *out, char *link)
*/
void dump_block_check(FILE *out, struct ocfs2_block_check *bc)
{
- if (ocfs2_meta_ecc(OCFS2_RAW_SB(gbls.fs->fs_super)))
- fprintf(out, "\tCRC32: %"PRIu32" ECC: %"PRIu16"\n",
- le32_to_cpu(bc->bc_crc32e),
- le16_to_cpu(bc->bc_ecc));
- else
- fprintf(out, "\tCRC32: N/A ECC: N/A\n");
+ fprintf(out, "\tCRC32: %.8"PRIx32" ECC: %.4"PRIx16"\n",
+ le32_to_cpu(bc->bc_crc32e), le16_to_cpu(bc->bc_ecc));
}
/*
--
1.5.6.5
--
"Baby, even the losers
Get luck sometimes.
Even the losers
Keep a little bit of pride."
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127
More information about the Ocfs2-tools-devel
mailing list