diff mbox

[13/37] dumpe2fs: Display inode bitmap checksum

Message ID 20110901003634.1176.10897.stgit@elm3c44.beaverton.ibm.com
State Superseded, archived
Headers show

Commit Message

Darrick J. Wong Sept. 1, 2011, 12:36 a.m. UTC
Display the inode bitmap checksum for each block group.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
---
 misc/dumpe2fs.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)



--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Andreas Dilger Sept. 4, 2011, 6:30 p.m. UTC | #1
On 2011-08-31, at 6:36 PM, "Darrick J. Wong" <djwong@us.ibm.com> wrote:
> Display the inode bitmap checksum for each block group.
> 
> Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
> ---
> misc/dumpe2fs.c |    5 +++++
> 1 files changed, 5 insertions(+), 0 deletions(-)
> 
> 
> diff --git a/misc/dumpe2fs.c b/misc/dumpe2fs.c
> index 7d74e84..ed207cb 100644
> --- a/misc/dumpe2fs.c
> +++ b/misc/dumpe2fs.c
> @@ -220,6 +220,11 @@ static void list_desc (ext2_filsys fs)
>        print_number(ext2fs_inode_bitmap_loc(fs, i));
>        print_bg_rel_offset(fs, ext2fs_inode_bitmap_loc(fs, i), 0,
>                    first_block, last_block);
> +        if (fs->super->s_desc_size >= EXT2_MIN_DESC_SIZE_64BIT &&
> +            fs->super->s_feature_ro_compat &
> +            EXT4_FEATURE_RO_COMPAT_METADATA_CSUM)
> +            printf(_(", checksum 0x%08x"),

Since this line is already very long, printing "csum" should be enough. 

> +                  ext2fs_inode_bitmap_checksum(fs, i));
>        fputs(_("\n  Inode table at "), stdout);
>        print_range(ext2fs_inode_table_loc(fs, i),
>                ext2fs_inode_table_loc(fs, i) +
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Darrick J. Wong Sept. 5, 2011, 7:20 p.m. UTC | #2
On Sun, Sep 04, 2011 at 12:30:32PM -0600, Andreas Dilger wrote:
> On 2011-08-31, at 6:36 PM, "Darrick J. Wong" <djwong@us.ibm.com> wrote:
> > Display the inode bitmap checksum for each block group.
> > 
> > Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
> > ---
> > misc/dumpe2fs.c |    5 +++++
> > 1 files changed, 5 insertions(+), 0 deletions(-)
> > 
> > 
> > diff --git a/misc/dumpe2fs.c b/misc/dumpe2fs.c
> > index 7d74e84..ed207cb 100644
> > --- a/misc/dumpe2fs.c
> > +++ b/misc/dumpe2fs.c
> > @@ -220,6 +220,11 @@ static void list_desc (ext2_filsys fs)
> >        print_number(ext2fs_inode_bitmap_loc(fs, i));
> >        print_bg_rel_offset(fs, ext2fs_inode_bitmap_loc(fs, i), 0,
> >                    first_block, last_block);
> > +        if (fs->super->s_desc_size >= EXT2_MIN_DESC_SIZE_64BIT &&
> > +            fs->super->s_feature_ro_compat &
> > +            EXT4_FEATURE_RO_COMPAT_METADATA_CSUM)
> > +            printf(_(", checksum 0x%08x"),
> 
> Since this line is already very long, printing "csum" should be enough. 

Ok.

--D
> 
> > +                  ext2fs_inode_bitmap_checksum(fs, i));
> >        fputs(_("\n  Inode table at "), stdout);
> >        print_range(ext2fs_inode_table_loc(fs, i),
> >                ext2fs_inode_table_loc(fs, i) +
> > 
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/misc/dumpe2fs.c b/misc/dumpe2fs.c
index 7d74e84..ed207cb 100644
--- a/misc/dumpe2fs.c
+++ b/misc/dumpe2fs.c
@@ -220,6 +220,11 @@  static void list_desc (ext2_filsys fs)
 		print_number(ext2fs_inode_bitmap_loc(fs, i));
 		print_bg_rel_offset(fs, ext2fs_inode_bitmap_loc(fs, i), 0,
 				    first_block, last_block);
+		if (fs->super->s_desc_size >= EXT2_MIN_DESC_SIZE_64BIT &&
+		    fs->super->s_feature_ro_compat &
+		    EXT4_FEATURE_RO_COMPAT_METADATA_CSUM)
+			printf(_(", checksum 0x%08x"),
+			       ext2fs_inode_bitmap_checksum(fs, i));
 		fputs(_("\n  Inode table at "), stdout);
 		print_range(ext2fs_inode_table_loc(fs, i),
 			    ext2fs_inode_table_loc(fs, i) +