Commit Graph

5414 Commits (fd80e987d7a62a4aee7a9a4fb167f707b312e9fa)

Author SHA1 Message Date
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
JP Abgrall 5efe492d19 llseek: setup the correct seek for ext2fs_llseek
After
  http://git.kernel.org/cgit/fs/ext2/e2fsprogs.git/commit/lib/ext2fs/llseek.c?id=274d46e1d35af423d0292d63c4d0ad7a03be82ba

with
  __linux__
  defined(HAVE_LSEEK64) && defined(HAVE_LSEEK64_PROTOTYPE)
  SIZEOF_OFF_T >= SIZEOF_LONG_LONG
it leads to ext2fs_llseek() doing a "return lseek(fd, offset, origin);"
Which  fails for offsets > 32bit.

Also, with
  __linux__
  !(defined(HAVE_LSEEK64) && defined(HAVE_LSEEK64_PROTOTYPE))
  defined(HAVE_LLSEEK)
  SIZEOF_OFF_T == SIZEOF_LONG_LONG
my_llseek is not defined at all. And there is no need to define
llseek as lseek, as llseek is never used.
Luckily ext2fs_llseek() then does "return lseek(...);"
It would seem that my_llseek should be used in both places.

Addresses-Google-Bug: #13340735
Change-Id: Ie7330300c9c1ca103eaaef97536dcf10adbbba02
Signed-off-by: JP Abgrall <jpa@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-03-25 12:00:18 -04:00
Theodore Ts'o 3bf56ef624 Merge branch 'maint' into next 2016-03-22 00:03:09 -04:00
Theodore Ts'o 8ef71d873c tests: fix Makefile so it is portable to gmake 3.x
In commit 0355d6d047 we used a Makefile shell assignment syntax
which is compatible with pmake and gmake 4.x, but which breaks on
gmake 3.x.  So only use the pmake-compatible construction if we are
not using GNU make.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-03-22 00:01:19 -04:00
Theodore Ts'o ca82d22bed Fix FreeBSD portability problems
FreeBSD doesn't have libintl support built into the libc, and
libsupport requires libintl support.  So we need to make sure it is
available when we link against the libsupport library.

Also, work around *BSD's interesting interpretation of how
_XOPEN_SOURCE is supposed to work.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-03-21 23:43:41 -04:00
Theodore Ts'o b42b7bae73 Merge branch 'maint' into next 2016-03-21 13:21:03 -04:00
Theodore Ts'o 8f6f8602dc libext2fs: make sure ismounted.c explicitly pulls in <sys/types.h>
The major() cpp macro is defined as requiring sys/types.h to be
included with _BSD_SOURCE defined.  However, in older glibc's this
hasn't been strictly required and the stdlib.h header file included
sys/types.h implicitly.  Fix this so that more aggressive
distributions run into build errors.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>

in with andchanges. Lines starting
2016-03-21 13:09:54 -04:00
Theodore Ts'o 31ddef52ba Fix warnings caused by glibc 2.20
Glibc has depcreated _SVID_SOURCE and _BSD_SOURCE in favor of
_DEFAULT_SOURCE.  So define _DEFAULT_SOURCE to shut up glibc 2.20

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-03-21 13:05:25 -04:00
Theodore Ts'o 37000b0245 libsupport: fix potential resource leaks in the profile code
These were found by Coverity.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-03-18 17:14:15 -04:00
Theodore Ts'o 25040c0431 chattr: fix verbose message while setting the project id
This was caused by a cut and paste error.  (Thanks to Coverity for
pointing this out).

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-03-18 16:49:51 -04:00
Theodore Ts'o 855c5e0dfb util: add get-var script
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-03-18 16:29:19 -04:00
Theodore Ts'o e1eee3e13e Android.mk: add missing source files from lib/e2p/Android.mk
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-03-18 16:24:53 -04:00
Theodore Ts'o a96aa32505 libsupport: fix function prototype for parse_quota_opts
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-03-18 16:11:53 -04:00