Whamcloud - gitweb
git://git.whamcloud.com
/
tools
/
e2fsprogs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
466137f
)
libext2fs: fix bad cast which causes problems for file systems > 512EB
author
Theodore Ts'o
<tytso@mit.edu>
Tue, 4 Oct 2011 03:47:19 +0000
(23:47 -0400)
committer
Theodore Ts'o
<tytso@mit.edu>
Tue, 4 Oct 2011 03:47:19 +0000
(23:47 -0400)
If the number of block groups exceeds 2**32, a bad cast would lead to
a bogus "Not enough space to build proposed filesystem while setting
up superblock" failure.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
lib/ext2fs/initialize.c
patch
|
blob
|
history
diff --git
a/lib/ext2fs/initialize.c
b/lib/ext2fs/initialize.c
index
2875f97
..
b050a0a
100644
(file)
--- a/
lib/ext2fs/initialize.c
+++ b/
lib/ext2fs/initialize.c
@@
-248,7
+248,7
@@
errcode_t ext2fs_initialize(const char *name, int flags,
}
retry:
- fs->group_desc_count = (
blk
_t) ext2fs_div64_ceil(
+ fs->group_desc_count = (
dgrp
_t) ext2fs_div64_ceil(
ext2fs_blocks_count(super) - super->s_first_data_block,
EXT2_BLOCKS_PER_GROUP(super));
if (fs->group_desc_count == 0) {