]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
Basic flexible block group support
authorTheodore Ts'o <tytso@mit.edu>
Tue, 22 Apr 2008 11:47:25 +0000 (07:47 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 23 Apr 2008 03:32:15 +0000 (23:32 -0400)
Add superblock definition, and dumpe2fs and debugfs support.

Signed-off-by: Jose R. Santos <jrs@us.ibm.com>
Signed-off-by: Valerie Clement <valerie.clement@bull.net>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
debugfs/set_fields.c
lib/e2p/ls.c
lib/ext2fs/ext2_fs.h

index ee51c4591dcb9814f63f56ba50cba8d373020218..25343f0ed46d084e64ab576cb5f28601e1f1f520 100644 (file)
@@ -132,6 +132,7 @@ static struct field_set_info super_fields[] = {
        { "mmp_interval", &set_sb.s_mmp_interval, 2, parse_uint },
        { "mmp_block", &set_sb.s_mmp_block, 8, parse_uint },
        { "raid_stripe_width", &set_sb.s_raid_stripe_width, 4, parse_uint },
+       { "log_groups_per_flex", &set_sb.s_log_groups_per_flex, 1, parse_uint },
        { 0, 0, 0, 0 }
 };
 
index b1196068d11f0f5660aa7383757ad78d8023be93..c211dce78afbd11ff934d4f0b63fa39187ec5d40 100644 (file)
@@ -242,6 +242,9 @@ void list_super2(struct ext2_super_block * sb, FILE *f)
        if (sb->s_first_meta_bg)
                fprintf(f, "First meta block group:   %u\n",
                        sb->s_first_meta_bg);
+       if (sb->s_log_groups_per_flex)
+               fprintf(f, "Flex block group size:    %u\n",
+                       1 << sb->s_log_groups_per_flex);
        if (sb->s_mkfs_time) {
                tm = sb->s_mkfs_time;
                fprintf(f, "Filesystem created:       %s", ctime(&tm));
index ad42cf80aaab8448dfc2148727043162a0000686..f23c8fd8104b5bdf615101fb45371c9a04861263 100644 (file)
@@ -564,7 +564,10 @@ struct ext2_super_block {
        __u16   s_mmp_interval;         /* # seconds to wait in MMP checking */
        __u64   s_mmp_block;            /* Block for multi-mount protection */
        __u32   s_raid_stripe_width;    /* blocks on all data disks (N*stride)*/
-       __u32   s_reserved[163];        /* Padding to the end of the block */
+       __u8    s_log_groups_per_flex;  /* FLEX_BG group size */
+       __u8    s_reserved_char_pad;
+       __u16   s_reserved_pad;         /* Padding to next 32bits */
+       __u32   s_reserved[162];        /* Padding to the end of the block */
 };
 
 /*