Commit Graph

5544 Commits (master)

Author SHA1 Message Date
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
Theodore Ts'o 9c05bb9fba tune2fs: don't include journal recovery when building for Android
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-03-18 16:07:34 -04:00
Theodore Ts'o f5b69d4ad1 Android.mk: fix up the library -host naming convention change
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-03-18 15:24:39 -04:00
Theodore Ts'o dd9a866b08 fuse2fs.1: add manual page for fuse2fs
Also add libfuse-dev to the Debian build depends so that fuse2fs gets
built for Debian.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-03-18 15:23:35 -04:00
Theodore Ts'o 82e48fb163 Fix various clang and gcc -Wall warnings
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-03-18 12:45:19 -04:00
Theodore Ts'o 17ea174a75 libext2fs: fix build failure in lib/ext2fs/swapfs on big-endian systems
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-03-17 22:39:10 -04:00
Theodore Ts'o e3760b72c6 Update lib/ext2fs/Makefile.in using "make depend"
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-03-15 01:50:40 -04:00
Theodore Ts'o 9e78ef7288 Update translation template file
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-03-15 01:49:00 -04:00
Theodore Ts'o 526f554c99 Update release notes for a 1.43-WIP release (14-Mar-2016)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-03-15 01:37:28 -04:00
Theodore Ts'o f8fd2fdc1e debian: update debian policy conformance to 3.9.7
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-03-15 01:30:55 -04:00
Alex Deymo 205593f65b Android.mk: Replace _host suffix with more standard -host suffix
Most libraries use the "-host" suffix when building for the host. This
patch renames all the libraries to use -host instead of _host.

Addresses-Google-Bug: #24619596
TEST=make dist

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-03-15 01:25:11 -04:00
Theodore Ts'o 2ab53829a2 configure.ac: fix up Debian naming scheme for its orig.tar.gz file
We are using a new convention for the 1.43-WIP releases which should
be less confusion by replacing the hyphens by periods (e.g.,
1.43~WIP.2016.03.06 instead of 1.43~WIP-2016-03-06).  This avoids
confusion regarding the debian release number (which uses the last
hyphen in the version string to separate the upstream version from the
release number).

Also fix a typo in the version number used in the debian changelog and
e2fslibs.symbols file.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-03-15 01:24:44 -04:00
Damien Miller 9dd404897d gen-android-files: create the MODULE_LICENSE_GPL and README.version files
These package version metadata files will be used for automated
notification of external vulnerability reports in Android.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-03-15 00:45:03 -04:00
James Hawkins 1598731833 libuuid: Silence warnings in lib/uuid when building on Android
-Wno-unused-function
-Wno-unused-parameter

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-03-14 19:04:48 -04:00
Mark Salyzyn cd26dc101c Android.mk: export uuid/uuid.h
Addresses-Google-Bug: #23181629
Addresses-Google-Bug: #24133481

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-03-14 18:41:45 -04:00
Alex Deymo 5eeb0cca33 libext2fs: export the library include path
When adding 'libext2fs' as a library dependency from any other binary,
the binary needs to find the library headers. Users of this library
should not hard-code the include path themselves. This patch exports the
library headers on all three version of the libext2fs library and
removes the redundant include path from executables in e2fsprogs.

Addresses-Google-Bug: #23084776
TEST=mma

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-03-14 18:39:48 -04:00
Jeff Sharkey 7c33c8899f blkid: add support to recognize f2fs to blkid
We can now identify f2fs filesystems and extract the UUID.

Addresses-Google-Bug: #20275581

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-03-14 18:39:13 -04:00
Ying Wang d8d67ec7d9 Cleanup Obsolete LOCAL_PRELINK_MODULE
Addresses-Google-Bug: #18675947

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-03-14 18:38:43 -04:00
Tao Bao 4ccb2366d8 Wrap tune2fs.h to be C++ compatible
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-03-14 18:38:26 -04:00
Theodore Ts'o c733f9987e Rename COPYING to NOTICE and add MODULE_LICENSE_GPL file
The NOTICE and MODULE_LICENSE_GPL files is the convention used by
Android's Open Source Project.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-03-14 14:50:37 -04:00
David Turner 082ed5dcd9 e2fsck: correct ext4 dates generated by old kernels
Older kernels on 64-bit machines would incorrectly encode pre-1970
ext4 dates as post-2311 dates.  Detect and correct this (assuming the
current date is before 2242).

Include tests for this, as well as changes to debugfs to correctly
set crtimes.

Signed-off-by: David Turner <novalis@novalis.org>
Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-03-14 13:57:33 -04:00