e2fsprogs/lib/e2p
Andreas Dilger 11d1116a7c e2fsck: verify s_desc_size is power-of-two value
Add a LOG2_CHECK mode for check_super_value() so that it is easy
to verify values that are supposed to be power-of-two values
(s_desc_size and s_inode_size so far).  In ext2fs_check_desc()
also check for a power-of-two s_desc_size.

Print out s_desc_size in debugfs "stats" and dumpe2fs output, if
it is non-zero.

It turns out that the s_desc_size validation in check_super_block()
is not currently used by e2fsck, because the group descriptors are
verified earlier by ext2fs_check_desc(), and even without an
explicit check of s_desc_size the group descriptors fail to align
correctly on disk.  It makes sense to keep the check_super_block()
regardless, in case the code changes at some point in the future.

Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2013-12-23 16:03:46 -05:00
..
Makefile.in e2fsprogs: add (optional) sparse checking to the build 2013-10-11 23:12:40 -04:00
e2p.h Merge branch 'maint' into next 2010-06-07 12:42:40 -04:00
e2p.pc.in Change pkg-config files so that both <et/com_err.h> and <com_err.h> work 2012-05-14 12:45:54 -04:00
feature.c libe2p: teach e2p_jrnl_feature2string() about the 64-bit journal feature 2012-05-21 10:59:01 -04:00
fgetflags.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
fgetversion.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
fsetflags.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
fsetversion.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
getflags.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
getversion.c Fix gcc -Wall nits 2013-01-01 13:28:27 -05:00
hashstr.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
iod.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
ls.c e2fsck: verify s_desc_size is power-of-two value 2013-12-23 16:03:46 -05:00
mntopts.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
ostype.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
parse_num.c e2p: Fix 's' handling in parse_num_blocks2() 2013-02-28 20:12:30 -05:00
pe.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
percent.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
pf.c lsattr, chattr: add support for btrfs's No_COW flag 2012-06-12 17:30:10 -04:00
ps.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
setflags.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
setversion.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
uuid.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00