From: Theodore Ts'o Date: Fri, 1 Jul 2005 00:00:41 +0000 (-0400) Subject: Change mke2fs to refuse to create filesystems greater than 2*31-1 blocks, X-Git-Tag: E2FSPROGS-1_38~2 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=675b79c47f7fb437d48ceff82db33c6cc780a508;p=tools%2Fe2fsprogs.git Change mke2fs to refuse to create filesystems greater than 2*31-1 blocks, at least unless forced. --- diff --git a/misc/ChangeLog b/misc/ChangeLog index 3ad0f53..6a2bd51 100644 --- a/misc/ChangeLog +++ b/misc/ChangeLog @@ -1,3 +1,9 @@ +2005-06-30 Theodore Ts'o + + * mke2fs.c (PRS): Do not support filesystems with more 2**31-1 + blocks, since there may be kernel bugs with such + filesystems. + 2005-06-26 Theodore Ts'o * tune2fs.8.in: Fix minor typos pointed out by Benno Schulenberg. diff --git a/misc/mke2fs.c b/misc/mke2fs.c index 49689c3..2379ddc 100644 --- a/misc/mke2fs.c +++ b/misc/mke2fs.c @@ -1352,6 +1352,13 @@ static void PRS(int argc, char *argv[]) } } + if (!force && param.s_blocks_count >= (1 << 31)) { + com_err(program_name, 0, + _("Filesystem too large. No more than 2**31-1 blocks\n" + "\t (8TB using a blocksize of 4k) are currently supported.")); + exit(1); + } + if (inode_size) { if (inode_size < EXT2_GOOD_OLD_INODE_SIZE || inode_size > EXT2_BLOCK_SIZE(¶m) ||