diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2018-06-26 19:35:52 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-06-26 19:35:52 +0000 |
commit | 39e0ab1477e721dde9ab67c7b4ecb617d5224d0e (patch) | |
tree | d2f65d7b2f9467d06e47c9f405430827a46cad5b /ext4_utils | |
parent | 06bd30b5fd54a6e64a1839f16efa7ee05cec339a (diff) | |
parent | fa4cb054abfb8fb59b5dd06fb0785fb370748c57 (diff) | |
download | extras-39e0ab1477e721dde9ab67c7b4ecb617d5224d0e.tar.gz |
Merge "ext4_utils: Fix FS creation for filesystems with exactly 32768 blocks."
Diffstat (limited to 'ext4_utils')
-rw-r--r-- | ext4_utils/ext4_utils.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext4_utils/ext4_utils.c b/ext4_utils/ext4_utils.c index 86098519..36830ba2 100644 --- a/ext4_utils/ext4_utils.c +++ b/ext4_utils/ext4_utils.c @@ -217,7 +217,8 @@ void ext4_create_fs_aux_info() aux_info.default_i_flags = EXT4_NOATIME_FL; - u32 last_group_size = aux_info.len_blocks % info.blocks_per_group; + u32 last_group_size = aux_info.len_blocks == info.blocks_per_group + ? aux_info.len_blocks : aux_info.len_blocks % info.blocks_per_group; u32 last_header_size = 2 + aux_info.inode_table_blocks; if (ext4_bg_has_super_block(aux_info.groups - 1)) last_header_size += 1 + aux_info.bg_desc_blocks + |