OSDN Git Service

libext2fs: fix maximum bg overhead calculation with meta_bg enabled
authorDarrick J. Wong <darrick.wong@oracle.com>
Sat, 24 Oct 2015 04:24:57 +0000 (00:24 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 24 Oct 2015 04:24:57 +0000 (00:24 -0400)
commit1abdd04eb1d19488493022f81c03f5b80aa7fcc7
treea2d43ab18c5474bae7466c88c2a90db3def19cea
parent7bba54e71b25931be758ecade5b8412f4b0bb7a1
libext2fs: fix maximum bg overhead calculation with meta_bg enabled

When meta_bg is enabled at mkfs time, we put at most one group
descriptor block in each blockgroup.  Unfortunately, the calculation
of max overhead per bg doesn't know this, so mkfs fails when it isn't
strictly necessary.  Fix it, since Dave reported that he couldn't
create a 500TB ext4 filesystem.

Reported-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/ext2fs/initialize.c