resize2fs: enforce the 16TB limit on 32-bit file systems correctly

The 16TB limit must be enforced regardless of whether the new size is
specified on the command line or implied by the size of the device,
but only if the file system does not support 64-bit block sizes, or
the kernel does not advertise support of meta_bg resizing.

Previously we were unconditionally enforcing it when it was implied by
the device size, but not if the new size was specified on the command
line.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
resize2fs: fix overhead calculation for meta_bg file systems

The file system overhead calculation in calculate_minimum_resize_size
was incorrect meta_bg file systems.  This caused the minimum size to
underflow for very large file systems, which threw resize2fs into a
loop generally lasted longer than the user's patience.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
resize2fs: allow meta_bg/64-bit file systems to be online resized

Resize2fs can't handle resizing flex_bg file systems that do not have
the resize inode, but when the kernel adds support for resizing using
the meta_bg layout, we should allow it be able to resize the file
system.

So move the flex_bg/resize_inode check to the just before we start
doing the off-line resize, instead of doing it earlier where it would
prohibit these file systems for both on-line and off-line resizes.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
resize2fs: enforce restrictions if the kernel doesn't do meta_bg resizing

Enhance the online resizing code to be more nuanced about resizing
restrictions.  If the kernel supports meta_bg resizing, then we can
skip all of the restrictions.  If the kernel does not support meta_bg
resizing, check more carefully to make sure there are enough reserved
gdt blocks, so that the user gets a clearer error message.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
resize2fs: grow uninit_bg file systems more efficiently

If the uninit_bg feature is enabled and the kernel supports
lazy_itable_init, skip zeroing the inode table so that the resize
operation can go much more quickly.  Also set the itable_unused fields
so that the first e2fsck after the resize will run faster.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
mke2fs: throttle progress updates to once a second

With lazy itable initialization, the progress updates for writing the
inode table happens so quickly that on a serial console, the time to
write the progress updates can be the bottleneck.  Fix this by only
updating the progress indicator once a second.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
mke2fs: disable progress reporting in mke2fs.conf for regression tests

Add a configuration knob so the regression tests can disable progress
reporting.  This fixes a potential lack of predictability since the
progress reports are now time based (once a second) which is
problematic for regression tests which are comparing the expected
output of mke2fs.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
tests: kill debugfs on interrupted MMP test

If the f_mmp test is interrupted during its test run, then it can
leave debugfs busy-looping in the background.  Since f_mmp is a
relatively long-running test, and is likely to be running during
a parallel test run, this can happen fairly often.

Set a signal trap for the f_mmp test script being killed, so that
the background debugfs command will always be killed by the test.

Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Merge branch 'maint' into next

Conflicts:
	resize/resize2fs.c
debian: adjust build dependencies

Remove dc from the list of dependencies, since it's not used during
the build anymore.

Addresses-Debian-Bug: #677497

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
mke2fs.8: use extents vs extent in the man page

We print "extents" for the feature, so we should document "extents" in
the mke2fs's man page, even though we accept both "extent" and
"extents".

Addresses-Sourceforge-Bug: #3559210

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
mke2fs: throttle allocating groups progress as well

Throttle updates for the "Allocating Groups" progress updates to once
a second as well.  We now do this throttling in libext2fs, so we don't
have to do this for each of mke2fs's progress updates, and because the
updates from ext2fs_allocate_tables() come from within libext2fs
anyway.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Fix wordwrap.pl so it is more portable

Needed so that wordwrap.pl works with perl 5.14.2

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Update Release Notes, Changelogs, version.h, etc. for 1.42.6 release
Merge branch 'maint' into next

Conflicts:
	debian/changelog
	version.h
libext2fs: always define i_checksum_lo

Always #define i_checksum_lo, since otherwise e2fsprogs won't compile
on non-Linux platforms.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
mke2fs: prohibit file system features not supported by the HURD

There are certain file system features which can not be supported by
the HURD, since they use fields in the inode which have been claimed
by HURD-specific features (i.e., such as the author field).  We will
mask out those features so they are not enabled by accident, but if the
user tries to explicitly specify them we will issue an error message.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
mke2fs: fix progress suppression to make regression tests reliable

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Merge branch 'maint' into next
Update for e2fsprogs-1.43-WIP-2012-09-22