diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2012-06-21 18:50:46 +0400 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2012-06-21 18:50:46 +0400 |
commit | c9a13116a4497f4597ad5db6eb3cac9680fd6fc4 (patch) | |
tree | 7089fec95d805ae2678efa875aaf35608e7f9b8f /util-linux | |
parent | 9ee426649006c4a0db7b4784f2ebb96865d4c705 (diff) |
mount: fix the wrongly stored fs creation time
This bug made our ext2 images non-mountable by ext4 driver.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'util-linux')
-rw-r--r-- | util-linux/mkfs_ext2.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/util-linux/mkfs_ext2.c b/util-linux/mkfs_ext2.c index 69b25c946..3258d7eee 100644 --- a/util-linux/mkfs_ext2.c +++ b/util-linux/mkfs_ext2.c @@ -53,11 +53,6 @@ #define ENABLE_FEATURE_MKFS_EXT2_RESERVED_GDT 0 #define ENABLE_FEATURE_MKFS_EXT2_DIR_INDEX 1 -// from e2fsprogs -#define s_reserved_gdt_blocks s_padding1 -#define s_mkfs_time s_reserved[0] -#define s_flags s_reserved[22] - #define EXT2_HASH_HALF_MD4 1 #define EXT2_FLAGS_SIGNED_HASH 0x0001 #define EXT2_FLAGS_UNSIGNED_HASH 0x0002 @@ -482,8 +477,10 @@ int mkfs_ext2_main(int argc UNUSED_PARAM, char **argv) STORE_LE(sb->s_magic, EXT2_SUPER_MAGIC); STORE_LE(sb->s_inode_size, inodesize); // set "Required extra isize" and "Desired extra isize" fields to 28 - if (inodesize != sizeof(*inode)) - STORE_LE(sb->s_reserved[21], 0x001C001C); + if (inodesize != sizeof(*inode)) { + STORE_LE(sb->s_min_extra_isize, 0x001c); + STORE_LE(sb->s_want_extra_isize, 0x001c); + } STORE_LE(sb->s_first_ino, EXT2_GOOD_OLD_FIRST_INO); STORE_LE(sb->s_log_block_size, blocksize_log2 - EXT2_MIN_BLOCK_LOG_SIZE); STORE_LE(sb->s_log_frag_size, blocksize_log2 - EXT2_MIN_BLOCK_LOG_SIZE); |