]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
mke2fs: load configfile blocksize setting before 64bit checks
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 11 Dec 2013 01:18:37 +0000 (17:18 -0800)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 12 Dec 2013 17:26:29 +0000 (12:26 -0500)
commitd20403df479efb35966470920c9a5cda581126d0
tree2f81b0bcd44f2536910be0f1f12ca76a01a95cf9
parent3b6c0938ec5aa401c7ae6c95e94e5ad30a7b8562
mke2fs: load configfile blocksize setting before 64bit checks

mke2fs has a series of checks to ensure that we don't create a
filesystem too big for its blocksize -- if auto-64bit is on, then it
turns on 64bit; otherwise it complains.  Unfortunately, it performs
these checks before looking in mke2fs.conf for a blocksize, which
means that the checks are incorrect if the user specifies a non-4096
blocksize in the config file and says nothing on the command line.
The bug also has the effect of mandating a 4k block size on any block
device larger than 4T in that situation.  Therefore, read the block
size from the config file before performing the 64bit checks.

Reviewed-by: Zheng Liu <wenqing.lz@taobao.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
misc/mke2fs.c