]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
Change mke2fs to refuse to create filesystems greater than 2*31-1 blocks,
authorTheodore Ts'o <tytso@mit.edu>
Fri, 1 Jul 2005 00:00:41 +0000 (20:00 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 1 Jul 2005 00:00:41 +0000 (20:00 -0400)
at least unless forced.

misc/ChangeLog
misc/mke2fs.c

index 3ad0f5384b6c4c992b3a26a1786fee00cb9e58a7..6a2bd51bcb539a54daabfd81d3ffa00fcca07ab8 100644 (file)
@@ -1,3 +1,9 @@
+2005-06-30  Theodore Ts'o  <tytso@mit.edu>
+
+       * 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  <tytso@mit.edu>
 
        * tune2fs.8.in: Fix minor typos pointed out by Benno Schulenberg.
index 49689c319af3e941e2a7abe18e9b31b2db64b1d6..2379ddc4e844bef7cff8a563c0d998aa14d3abe3 100644 (file)
@@ -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(&param) ||