Fork of e2fsprogs with inode table reallocator
 
 
 
 
 
 
Go to file
Andreas Dilger 2bc3041754 debugfs, e2fsck: fix s_desc_size handling
The s_desc_size in the superblock specifies the group descriptor
size in bytes, but in various places the EXT4_FEATURE_INCOMPAT_64BIT
flag implies that the descriptor size is EXT2_MIN_DESC_SIZE_64BIT
(64 bytes) instead of checking the actual size.  In other places,
the s_desc_size field is used without checking for INCOMPAT_64BIT.

In the case of ext2fs_group_desc() the s_desc_size was being ignored,
and assumed to be sizeof(struct ext4_group_desc), which would result
in garbage for any but the first group descriptor.  Similarly, in
ext2fs_group_desc_csum() and print_csum() they assumed that the
maximum group descriptor size was sizeof(struct ext4_group_desc).
Fix these functions to use the actual superblock s_desc_size if
INCOMPAT_64BIT.

Conversely, in ext2fs_swap_group_desc2() s_desc_size was used
without checking for INCOMPAT_64BIT being set.

The e2fsprogs behaviour is different than that of the kernel,
which always checks INCOMPAT_64BIT, and only uses s_desc_size to
determine the offset of group descriptors and what range of bytes
to checksum.

Allow specifying the s_desc_size field at mke2fs time with the
"-E desc_size=NNN" option.  Allow a power-of-two s_desc_size
value up to s_blocksize if INCOMPAT_64BIT is specified.  This
is not expected to be used by regular users at this time, so it
is not currently documented in the mke2fs usage or man page.

Add m_desc_size_128, f_desc_size_128, and f_desc_bad test cases to
verify mke2fs and e2fsck handling of larger group descriptor sizes.

Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2013-12-24 22:50:19 -05:00
config build: use long long for __u64 by default 2013-12-15 22:10:09 -05:00
contrib contrib/populate-extfs.sh: use debugfs to populate extX fs 2013-10-13 22:09:12 -04:00
debian debian: remove old symlinks to /usr/share/doc 2013-08-11 11:52:35 -04:00
debugfs debugfs, e2fsck: fix s_desc_size handling 2013-12-24 22:50:19 -05:00
doc Update Release Notes, Changelogs, version.h, for 1.42.8 release 2013-06-16 18:39:00 -04:00
e2fsck debugfs, e2fsck: fix s_desc_size handling 2013-12-24 22:50:19 -05:00
ext2ed e2fsprogs: add (optional) sparse checking to the build 2013-10-11 23:12:40 -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 e2fsprogs: add (optional) sparse checking to the build 2013-10-11 23:12:40 -04:00
lib debugfs, e2fsck: fix s_desc_size handling 2013-12-24 22:50:19 -05:00
misc debugfs, e2fsck: fix s_desc_size handling 2013-12-24 22:50:19 -05:00
po build: use long long for __u64 by default 2013-12-15 22:10:09 -05:00
resize Clean up sparse warnings 2013-12-16 18:56:36 -05:00
tests debugfs, e2fsck: fix s_desc_size handling 2013-12-24 22:50:19 -05:00
util Clean up sparse warnings 2013-12-16 18:56:36 -05:00
.gitignore build: use long long for __u64 by default 2013-12-15 22:10:09 -05: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 optional static code analysis using sparse 2013-10-23 20:09:12 -04:00
Makefile.in Fix optional static code analysis using sparse 2013-10-23 20:09:12 -04:00
README Update Release Notes, Changelogs, version.h, for 1.42.8 release 2013-06-16 18:39:00 -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, etc., for final 1.42.8 release 2013-06-20 23:11:13 -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 mke2fs: disallow creating FS on a loop mounted file with no option 2013-12-16 00:48:54 -05:00
configure.in mke2fs: disallow creating FS on a loop mounted file with no option 2013-12-16 00:48:54 -05: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, etc., for final 1.42.8 release 2013-06-20 23:11:13 -04:00
e2fsprogs.spec.in misc: clean up compiler warnings 2011-06-11 10:58:25 -04:00
version.h Update release notes, etc., for final 1.42.8 release 2013-06-20 23:11:13 -04:00
wordwrap.pl Fix wordwrap.pl so it is more portable 2012-09-21 12:50:04 -04:00

README

	This is the new version (1.42.8) 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.