Fork of e2fsprogs with inode table reallocator
 
 
 
 
 
 
Go to file
Akira Fujita 321649c9f4 mke2fs: recalculate the reserved blocks when the last BG is dropped
mke2fs -m option can set reserved blocks ratio up to 50%.  But if the
last block group is not big enough to support the necessary data
structures, it gets dropped, we have to recalculate the number of
reserved blocks so that the reserved blocks matches the requested
percentage.

It also avoids a problem where if the user specifies a reserved blocks
of 50%, and after the last partial block group was dropped, if the
number of reserved blocks is greater than 50%, e2fsck will complain.

Steps to reproduce:

1. Create a FS which has the overhead for the last BG
   and specify 50 % for reserved blocks ratio
 # mke2fs -m 50 -t ext4 DEV 1025M

 mke2fs 1.42.5 (29-Jul-2012)
 warning: 256 blocks unused.

 Filesystem label=
 OS type: Linux
 Block size=4096 (log=2)
 Fragment size=4096 (log=2)
 Stride=0 blocks, Stripe width=0 blocks
 656640 inodes, 2621440 blocks
 1310848 blocks (50.00%) reserved for the super user
 ~~~~~~~ <-- Reserved blocks exceed 50% of FS blocks count!

2. e2fsck outputs filesystem corruption
 # e2fsck DEV

 e2fsck 1.42.5 (29-Jul-2012)
 Corruption found in superblock.  (r_blocks_count = 1310848).

 The superblock could not be read or does not describe a correct ext2
 filesystem.  If the device is valid and it really contains an ext2
 filesystem (and not swap or ufs or something else), then the superblock
 is corrupt, and you might try running e2fsck with an alternate superblock:
     e2fsck -b 32768 <device>

Signed-off-by: Akira Fujita <a-fujita@rs.jp.ne.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2012-09-07 00:09:19 -04:00
config Update config.guess and config.sub to the latest (2012-02-10) version 2012-04-05 15:45:02 -07:00
contrib Add spd_readdir.c to the contrib directory 2011-09-25 02:10:54 -04:00
debian Update Release Notes, Changelogs, version.h, etc. for 1.42.5 release 2012-07-29 20:38:48 -04:00
debugfs e2fsprogs: fix spelling of 'filesystme' in debugfs help 2012-08-19 17:56:06 -04:00
doc Update Release Notes, Changelogs, version.h, etc. for 1.42.5 release 2012-07-29 20:38:48 -04:00
e2fsck e2fsck: fix potential segv when handling a read error in a superblock 2012-08-06 18:46:42 -04:00
ext2ed Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
include/nonunix Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
install-utils Remove Changelog files since they're not used after the git migration 2007-07-08 08:50:41 -04:00
intl Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
lib mke2fs: recalculate the reserved blocks when the last BG is dropped 2012-09-07 00:09:19 -04:00
misc e4defrag: handle device symlinks 2012-07-28 17:53:48 -04:00
po Update Release Notes, Changelogs, version.h, etc. for 1.42.5 release 2012-07-29 20:38:48 -04:00
resize Remove unnecessary escape before tab in man pages 2012-05-27 22:03:39 -04:00
tests tests: allow e2fsck tests to run on OS/X 2012-06-12 13:59:56 -04:00
util util: respect HAVE_MALLOC_H 2012-08-19 17:57:17 -04:00
.gitignore build: add generated files to .gitignore 2012-07-14 19:43:39 -04:00
.hgignore Ignore quilt work files 2005-07-19 08:41:27 -05:00
.missing-copyright Many files: 1997-04-29 16:15:03 +00:00
.release-checklist Update release checklist to include reminder to update translation 2008-07-10 17:25:22 -04:00
ABOUT-NLS Update to gettext 0.11.5. We now enable NLS support by default. 2003-05-03 16:35:17 -04:00
COPYING Clarify the copyright licenses used by the various libraries in COPYING 2007-06-23 01:04:53 -04:00
INSTALL Add a comment in INSTALL regarding --disable-tls on older systems 2008-07-10 09:08:44 -04:00
INSTALL.elfbin ChangeLog, INSTALL.elfbin: 1999-01-02 04:15:29 +00:00
MCONFIG.in Fix blhc (Build Log Hardening Check) warnings 2012-06-13 16:06:44 -04:00
Makefile.in Fix parallel (make -j) build 2012-05-11 22:13:29 -04:00
README Update Release Notes, Changelogs, version.h, etc. for 1.42.5 release 2012-07-29 20:38:48 -04:00
README.subset Update release notes, version files for 1.40.4 release 2008-01-01 00:35:17 -05:00
RELEASE-NOTES Update Release Notes, Changelogs, version.h, etc. for 1.42.5 release 2012-07-29 20:38:48 -04:00
SHLIBS Many files: 1997-04-29 16:15:03 +00:00
SUBMITTING-PATCHES Added SUBMITTING-PATCHES file 2005-07-05 22:30:13 -05:00
TODO Update TODO to remove item which is already completed. 2006-05-13 09:28:04 -04:00
aclocal.m4 Enhance build system so that "make V=1" works like the Linux Kernel 2009-07-02 18:19:10 -04:00
configure configure: fix --enable-relative-symlink 2012-09-07 00:09:19 -04:00
configure.in configure: fix --enable-relative-symlink 2012-09-07 00:09:19 -04:00
depfix.sed Update Release Notes, Changelogs, version.h, etc. for 1.42 release 2011-11-29 16:48:14 -05:00
e2fsprogs.lsm Update Release Notes, Changelogs, version.h, etc. for 1.42.5 release 2012-07-29 20:38:48 -04:00
e2fsprogs.spec.in misc: clean up compiler warnings 2011-06-11 10:58:25 -04:00
version.h Update Release Notes, Changelogs, version.h, etc. for 1.42.5 release 2012-07-29 20:38:48 -04:00
wordwrap.pl ChangeLog, wordwrap.pl: 2001-06-01 23:49:46 +00:00

README

	This is the new version (1.42.5) of the second extended file
system management programs.

	From time to time, I release new versions of e2fsprogs, to fix
bugs and to make the utilities more robust.  You can always find
information about the latest version at the the e2fsprogs web page,
which is:

	http://e2fsprogs.sourceforge.net

	The INSTALL file has instructions on building and installing
e2fsprogs.  Provisions for building Red Hat RPMs and Debian dpkg files
are supplied as well.

	In case of bugs in these programs, please contact Ted Ts'o at
tytso@mit.edu or tytso@alum.mit.edu.  See the e2fsck man page for
suggestions of what sort of information to include when submitting bug
reports for these programs.