Commit Graph

5426 Commits (d6adf070b0e85f209c0d7f310188b134b5cb7180)

Author SHA1 Message Date
Theodore Ts'o d6adf070b0 Update release notes for a 1.43 (17-Mar-2016) 2016-05-17 01:32:58 -04:00
Theodore Ts'o 0da058af9f mke2fs.conf: don't enable metadata_csum by default
For the 1.43 release, we will not be enabling the metadata_csum
feature by default.  We will leave that up to distribution vendors to
decide whether they want to be aggressive about enabling this feature
by default.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-17 01:32:58 -04:00
Theodore Ts'o 2520f77178 tests: rename t_mke2fs_errors and t_mke2fs_offset
The 't' prefix is for tune2fs tests.  The 'm' prefix is for mke2fs
tests.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-17 00:58:34 -04:00
Theodore Ts'o 051fd4e028 misc: fix various Coverity warnings
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-17 00:53:47 -04:00
Marcus Huewe 0935fa8da3 e2undo: support the undo header's fs_offset feature
If the fs_offset feature is present (and no "-o offset"
option is specified), e2undo performs the undo operation at
the stored offset.

Signed-off-by: Marcus Huewe <suse-tux@gmx.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-12 15:36:39 -04:00
Marcus Huewe ab7313f036 libext2fs: add fs_offset entry to the undo header
The fs_offset entry stores the filesystem offset. This allows for an
easy undo, because one does not have to remember/specify the
filesystem offset manually.
The fs_offset entry is implemented as a compatible feature.

Signed-off-by: Marcus Huewe <suse-tux@gmx.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-12 15:36:12 -04:00
Marcus Huewe 6930537d52 e2undo: add "-o offset" option to specify the filesystem offset
This is useful if the filesystem is located at an arbitrary
offset instead of the beginning of a device or file.

Signed-off-by: Marcus Huewe <suse-tux@gmx.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-12 15:36:00 -04:00
Marcus Huewe abf70cdcc1 libext2fs: fix key extension in undo_write_tdb
Support key extension if the tdb_data_size is an arbitrary integer
multiple of the channel's block size. Before, key extension was only
possible if the tdb_data_size and the channel's block size were
equal.
Note: a key, whose data is the result of a short read, will be
extended if the tdb_data_size and the channel's block size are equal
(that's what the old code did) (if tdb_data_size is an arbitrary
integer multiple (> 1) of the channel's block size, the key might
be extended as well (depending on the keysize)).

Signed-off-by: Marcus Huewe <suse-tux@gmx.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-12 15:35:44 -04:00
Marcus Huewe a7ea2ec02c libext2fs: fix offset code in undo_write_tdb
The old code has some issues, for example, when backing up fs block 0
(can be reproduced via "mke2fs -z undo -b 1024 -E offset=1024 out 1024"):
* backing_blk_num is set to ULLONG_MAX instead of 0
* data is read from the beginning of the file instead of offset 1024
* data_ptr is set to read_ptr - 1024 ("invalid" address)

Hence, the wrong fs block is associated with the wrong data.
For details, see also commit 76da764639cbfcc998f13c263a11a4601bcb9961.

Signed-off-by: Marcus Huewe <suse-tux@gmx.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-12 15:35:04 -04:00
Marcus Huewe cc090a3634 tests: testcases for the offset handling in e2undo and undo_io.c
The testcase "u_offset" tests/defines e2undo's new UI and offset
handling code. The testcase "u_mke2fs_opt_offset" documents some
issues with undo_io.c's old offset handling code (e.g., backup of
fs block 0, key extension (tdb_data_size != block_size) etc.).

Signed-off-by: Marcus Huewe <suse-tux@gmx.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-12 15:26:09 -04:00
Marcus Huewe dc01088db5 mke2fs: fix filesystem size calculation, if an offset is specified
If a filesystem size is explicitly specified, it should be used without
subtracting the offset.

Signed-off-by: Marcus Huewe <suse-tux@gmx.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-12 15:25:14 -04:00
Marcus Huewe 093d9b4006 tests: test "mke2fs -E offset=N" filesystem size calculation
If "mke2fs -E offset=N ..." is called without a specified filesystem size,
the offset should be subtracted from the default filesystem size (see
commit 87d9b2fb). If "mke2fs -E offset=N ..." is called with an
explicitly specified filesystem size, the specified filesystem size
should be used.

Also, call dd with the "iflag=fullblock" option, if it is going to read
from a pipe.

Signed-off-by: Marcus Huewe <suse-tux@gmx.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-12 15:08:46 -04:00
Theodore Ts'o fd80e987d7 debian: make e2fsprogs.postinst abort on error
Also fix typo in the postinst script

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-12 01:51:46 -04:00
Theodore Ts'o 3de9843235 Update release notes for a 1.43-WIP release (12-May-2016)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-12 01:02:53 -04:00
Theodore Ts'o 4baef0a235 Update e2fsprogs translation template file 2016-05-12 01:01:46 -04:00
Theodore Ts'o b8d0b0e1f6 fuse2fs.1: fix man page section of fuse2fs
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-12 00:02:07 -04:00
Theodore Ts'o 52d4a5b0bd debian: stop using dietlibc to build the static binaries
It's better to keep the e2fsprogs binaries consistently all using
glibc.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-12 00:00:38 -04:00
Theodore Ts'o 3888c1e84d libext2fs: sanity check group argument to ext2fs_clear_{block,inode}_uninit()
Avoid a potential out-of-bounds memory access if the group passed to
ext2fs_clear_block_uninit() or ext2fs_clear_inode_uninit() is greater
than the number of groups in the file system.  This prevents a failure
in resize2fs when to allocate a block when growing the file system
significantly.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-11 23:23:06 -04:00
Theodore Ts'o d0e855fa47 misc: avoid PATH_MAX dependency in create_inode.c
Addresses-Debian-Bug: #822576

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-11 00:08:58 -04:00
Theodore Ts'o b8aa9b6294 libext2s: only define FS_IOC_FIEMAP on Linux systems
Hurd and *BSD is not going to have FS_IOC_FIEMAP, at least not at
Linux's codepoint.

Addresses-Debian-Bug: #822576

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-10 23:44:21 -04:00
Theodore Ts'o 5a0affdb7d debian: disable fus2fs for Hurd
Hurd's libfuse is not compatible with the Linux version of libfuse.

Addresses-Debian-Bug: #822576

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-10 23:41:38 -04:00
Theodore Ts'o 0a1883c31a debian: update initramfs in e2fsprogs's postinst script
Addresses-Debian-Bug: #804237

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-10 23:27:04 -04:00
Theodore Ts'o f9b16db868 More man page and usage message fixups
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-10 23:23:14 -04:00
Theodore Ts'o aaa1ae0856 resize2fs, libext2fs: fix bugs in sparse_super2 support
Fix resize2fs so that the location of the backup superblocks when the
sparse_super2 feature is enabled is properly set when growing the file
system from a single block group to larger file system sizes.

Also fix a bug where the block group summary statistics in some cases
when exapnding a sparse_super2 file system.

Finally, accurately calculate the file system metadata overhead of the
last block group in sparse_super2 file systems.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-10 21:06:15 -04:00
Theodore Ts'o a039df9c4a mke2fs: support multiple -O options
Some users will get confused and try to specify multiple -O options.
So teach mke2fs to treat "-O feature1 -O feature2" as
"-O feature1,feature2".

https://bugzilla.kernel.org/show_bug.cgi?id=117421

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-10 17:41:08 -04:00
Theodore Ts'o 06ac2561c5 util: remove lib/support from the e2fsprogs-libs tar distribution
The lib/support library is only used for internal e2fsprogs programs,
and it won't compile correctly due to the fact that lib/ext2fs isn't
included in the e2fsprogs-libs distribution anyway.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-10 16:18:44 -04:00
Theodore Ts'o bc8f1ae523 Fix various man pages and usage message
Thanks to pete@lyptonyx for doing a close pass editing of e2fsprogs's
man pages.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-08 22:18:51 -04:00
Theodore Ts'o 97d7e2fdb2 libe2p: change the long flag name for -P to be Project_Hierarchy
This more clearly describes what the flag means.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-08 22:11:36 -04:00
Theodore Ts'o a195e862ca mke2fs: fix the parsing used for -E quotatype=usrquota:grpquota:prjquota
Commit 2d2d799c72 tried to use parse_quota_options(), which uses
commas to separate out the quota types.  Unfortunately, when parsing
extended options, commands are used to separate different extended
options.

To fix this, I've add a new support function parse_quota_type(), which
allows either commas or colons to used as a separator character, and
which manipulates a bit field to indicate which quota types should be
enabled.  Eventually tune2fs should be converted to use
parse_quota_type() as well, thus obsoleting parse_quota_options(), but
that's a more complicated cleanup patch for later.

Fix a lint warning which could the number of blocks to be incorretly
printed if it exceeds 2**32.

Also fix some typos and other minor bugs in the usage message.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-08 21:25:55 -04:00
Theodore Ts'o 1973233e53 e4crypt: remove debugging code which broke the set_policy subcommand
Also fixed some spelling typos in help messages.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-06 23:38:33 -04:00
Theodore Ts'o 87d9b2fb9e mke2fs: adjust the default file system size by the offset
If the user specifies an offset using -E offset without specifying an
explicit size, the system will use the block device (or file) size as
the default file system size.  If we are using the default file system
size, subtract out the offset so the resulting file system will stay
within the block device.  Also print a warning that this might not be
what the user wants.

Addresses-Debian-Bug: #803629

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-01 00:57:19 -04:00
Theodore Ts'o b3b7dafe91 Use texi2dvi --clean to work around a bug in texi2dvi
If the sources for e2fsprogs are located in a pathname that contains a
tilde character (which can happen when the sources are unpacked using
"apt-get source" when e2fsprogs has a pre-release test version),
texi2dvi will fail due to a bug (Debian bug #822492: "texinfo:
texi2dvi doesn't protect the ~ character in the second pass").  Work
around this bug by using texi2dvi --clean.

Addresses-Debian-Bug: #822227

Reported-by: svante.signell@gmail.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-04-30 22:19:59 -04:00
Theodore Ts'o a7dc56f45e mke2fs.8, badblocks.8: fix spelling errors and other miscellaneous typos
Reported-by: Pete <pete@leptonyx.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-04-30 22:00:54 -04:00
Darrick J. Wong 8feb6f439a fuse2fs: delete unused variables
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-04-25 14:53:24 -04:00
Theodore Ts'o 19df3aed71 tests: rename e2image related tests
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-04-25 12:02:38 -04:00
Darrick J. Wong 7dd0dfca04 e2image: ignore checksum errors
Since e2image is used to capture broken fs images for debugging,
ignore checksum errors when creating the image.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-04-25 11:03:09 -04:00
Theodore Ts'o d530271fb3 e2fsck: clean up error messages when journal is corrupted
Update the tests to match with the new behavior and error messages

Also fix test_one so that it doesn't print the failed test output in
the case where the script does not exist.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-04-17 00:44:06 -04:00
Theodore Ts'o f08999053e Fix build failure if --config-jbd-debug isn't enabled
This fixes a bug that was introduced recently in commit 1fc23b5e77.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-04-17 00:23:48 -04:00
Theodore Ts'o 27ce779d8c e2fsck: don't abort if the journal is corrupted due to checksum errors
If e2fsck_run_ext3_journal() returns an error indicating that a CRC
error was detected, we shouldn't abort, but instead proceed so the
file system can be fixed.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-04-15 21:09:24 -04:00
Theodore Ts'o 24b8916a62 e2fsck: don't try to set a UUID on metadata_csum file systems
If the UUID field is NULL, e2fsck will try to generate and set a new
UUID.  This will cause massive problems if the metadata_csum feature
is set, so avoid doing so in that case.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-04-15 20:51:36 -04:00
Theodore Ts'o b4f02c9f32 e2fsck: use specific CRC and corruption errors in journal recovery
Sync up with kernel commit 6a797d27: "ext4: call out CRC and
corruption errors with specific error codes".

This allows us to distinguish between CRC errors and I/O errors.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-04-15 19:35:02 -04:00
Theodore Ts'o 1fc23b5e77 Fix support for configure --enable-jbd-debug
We haven't used this in a while, so it's bitrotted a bit.  Fix it up
so that it works correctly.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-04-15 19:01:38 -04:00
Theodore Ts'o 4ea40c0bc2 Merge branch 'maint' into next 2016-04-15 11:33:30 -04:00
Eric Sandeen be5ce27525 e2image: don't leak progress info to stdout
Commit c8ee0d60 fixed most of these, but missed this one.

# e2image -r -p <device> - > imagefile

leads to a corrupted image due to the "Scanning inodes..."
printf going to stdout.

Reported-by: Alex Markley <alex@malexmedia.net>
Addresses-Red-Hat-Bugzilla: #1327329
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-04-15 10:59:02 -04:00
Theodore Ts'o c2db4cb7a2 e2fsck: Print "REBOOT SYSTEM" instead of "REBOOT LINUX"
As a nod to people building e2fsprogs for FreeBSD or Hurd.

Addresses-Debian-Bug: #769838

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-03-26 23:23:43 -04:00
Theodore Ts'o 0fad49b50d Fix missing prototype warnings caused by missing header files
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-03-26 23:18:34 -04:00
Marcus Huewe cba3fd5ca1 mke2fs: fix for the "-E offset=N" option
Configure the io channel with the specified offset before
calling mke2fs_discard_device(). Otherwise the data before offset
is discarded.

Signed-off-by: Marcus Huewe <suse-tux@gmx.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-03-26 22:26:40 -04:00
Marcus Huewe a7ac9c222d libext2fs: fix offset support in unix_io.c
Added offset support to the following functions:
- unix_cache_readahead
- unix_discard
- unix_zeroout

Signed-off-by: Marcus Huewe <suse-tux@gmx.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-03-26 22:26:02 -04:00
Marcus Huewe c66a3bbe83 tests: add testcase for "mke2fs -E offset=N..."
Test that mke2fs does not modify any data before the offset and
after the end of the filesystem.

Signed-off-by: Marcus Huewe <suse-tux@gmx.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-03-26 22:24:51 -04:00
Jeff Sharkey 62bc8d19bd blkid: fix blkid time diff bug
When calculating time diffs, use difftime() instead of risking
integer overflow.  Also build a "blkid" binary.

Addresses-Google-Bug: #11175082
Change-Id: I23521f45204574bb32f152926401c2cbad93175b

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-03-25 12:07:48 -04:00