OSDN Git Service
Ruchi Kandoi [Sat, 3 Dec 2016 00:43:22 +0000 (00:43 +0000)]
Merge "Revert "android: libext2fs and com_err for windows""
Adrien Schildknecht [Sat, 3 Dec 2016 00:37:00 +0000 (00:37 +0000)]
Revert "android: libext2fs and com_err for windows"
This reverts commit
7661be3a951d60f9181ab57011bfbe7e5ab5c80c.
Change-Id: I3eea5045606d15941ad3a0518292eaf8be801001
Treehugger Robot [Fri, 2 Dec 2016 22:48:21 +0000 (22:48 +0000)]
Merge changes from topic 'e2fsprogs'
* changes:
Update generated files for Android
android: add the ext2simg tool
e2fsdroid: create incremental images
e2fsdroid: read and enforce android's permissions
e2fsdroid: add an option to generate a base_fs file
e2fsdroid: a tool to create android compatible image
misc: add callbacks to populate_fs
android: libext2fs and com_err for windows
android: add rules to build the static host libraries
libext2fs: add context to get_alloc_block
libext2fs: android sparse io manager
Adrien Schildknecht [Fri, 2 Dec 2016 01:38:00 +0000 (17:38 -0800)]
Update generated files for Android
Test: cd external/e2fsprogs && mm
Change-Id: I2013e511f72532db1c2c4961cd4e6199b8225347
Adrien Schildknecht [Wed, 23 Nov 2016 18:21:42 +0000 (10:21 -0800)]
android: libext2fs and com_err for windows
Test: m libext2fs-host && m libext2_com_err-host
Change-Id: Id4ad914f86c92ebe4e4b0fb14a75ccb88189daba
Adrien Schildknecht [Thu, 1 Dec 2016 23:05:06 +0000 (15:05 -0800)]
android: add the ext2simg tool
This tool converts ext images to android sparse images.
Test: ext2simg img.ext4 img.sparse
simg2img img.sparse img2.ext4
e2fsck -f img.ext; e2fsck -f img2.ext
cmp img{,2}.ext
Change-Id: I7ec6f126160dacafb0946ba99f07d4bb42a19c45
Adrien Schildknecht [Wed, 23 Nov 2016 08:46:47 +0000 (00:46 -0800)]
android: add rules to build the static host libraries
Test: m libext2fs-host
Change-Id: I0f8155bc37516a59cf0ae1545ba37d52025f7a36
Adrien Schildknecht [Wed, 30 Nov 2016 06:15:18 +0000 (22:15 -0800)]
e2fsdroid: create incremental images
Add an option to read a base_fs file and allocate the blocks according
to the mapping provided by the file.
Test: 1/ Create a normal image and an incremental one.
Compare the number of blocks that have changed.
2/ Create an image.
Create an incremantal image.
The basefs file and the block_list file are the same.
Change-Id: Ie000ca48cf000d95e7a45a9752699abfc7484b6c
Adrien Schildknecht [Wed, 30 Nov 2016 06:01:52 +0000 (22:01 -0800)]
e2fsdroid: read and enforce android's permissions
Set the permissions and the extended attributes as defined by fs_config
and selinux.
Test: create an image with make_ext4 and with mke2fs + e2fsdroid
Compare the output of:
for f in `find . | sort`; do
xattr -l "$f"; md5sum "$f" ls -lah "$f"
done
Change-Id: I64c97f81c7f5e2bcf3cee3431e410d064cf0735a
Adrien Schildknecht [Wed, 30 Nov 2016 05:45:03 +0000 (21:45 -0800)]
e2fsdroid: add an option to generate a base_fs file
Test: make_ext4 and e2fsdroid both generate the same list of file.
Change-Id: Idaf42b64b588824d453bc204562ccbe702de26a9
Adrien Schildknecht [Wed, 30 Nov 2016 05:36:43 +0000 (21:36 -0800)]
e2fsdroid: a tool to create android compatible image
Add an option to generate a block_list file from an existing ext4 or sparse
image.
Test: make_ext4 and e2fsdroid both generate the same list of file.
Change-Id: I5ecc6521797397102904bf510c283dfd50a72721
Adrien Schildknecht [Wed, 30 Nov 2016 05:20:29 +0000 (21:20 -0800)]
misc: add callbacks to populate_fs
This patch let the caller of populate_fs registers a set of callbacks that
will be called everytime an inode is created.
Test: mm
Change-Id: I28ae100c4cc81223192860c29366cbac3077fe21
Adrien Schildknecht [Wed, 23 Nov 2016 21:02:16 +0000 (13:02 -0800)]
libext2fs: add context to get_alloc_block
This patch add some contexts to the allocator about the block that is about
to be allocated.
The custom Android block allocator need a way to differentiate data block
and metadata block.
Test: cd external/e2fsprogs/lib && mma
Change-Id: I2899936a3a0043d26e062bf1e542483e9a6ac98f
Adrien Schildknecht [Fri, 11 Nov 2016 06:34:32 +0000 (22:34 -0800)]
libext2fs: android sparse io manager
Add a new io manager to directly output sparse images.
Test: mke2fs [...] -E sparse_file;
simg2img system.img system.ext4;
e2fsck system.ext4
Change-Id: I41cf8c1b33d359be4f104e03fb4041863214843c
Treehugger Robot [Sat, 22 Oct 2016 07:54:41 +0000 (07:54 +0000)]
Merge "Fix mac build"
Colin Cross [Sat, 22 Oct 2016 06:13:42 +0000 (23:13 -0700)]
Fix mac build
Disable building debugfs and e4crypt on mac.
Add missing time.h include in ext2fs.h for time_t.
Test: mma -j
Change-Id: Iac9e09370eb45942c29ff8e3dc87a2ca4fec4981
Treehugger Robot [Sat, 22 Oct 2016 02:40:39 +0000 (02:40 +0000)]
Merge "Fix mac build"
Colin Cross [Fri, 21 Oct 2016 23:41:10 +0000 (16:41 -0700)]
Fix mac build
Disable linux-only features in config.h
Fix one use of ino_t instead of ext2_ino_t.
Test: mma -j
Test: e2fsck -f -n $OUT/system.img
Bug:
27599744
Change-Id: I3291ae888ac28a49813365ab2431a3c266de9907
Jeff Sharkey [Fri, 21 Oct 2016 21:51:58 +0000 (21:51 +0000)]
Merge changes from topic 'e2up'
* changes:
Bring back libext2_profile build rules.
Update generated files for Android
Upgrade e2fsprogs to v1.43.3.
Jeff Sharkey [Fri, 21 Oct 2016 18:44:14 +0000 (12:44 -0600)]
Bring back libext2_profile build rules.
Test: build, flash, run e2fsck
Bug:
27599744
Change-Id: I9445fc35b1c7d2ea915796781f6639b7f4446e5b
Jeff Sharkey [Fri, 21 Oct 2016 16:42:41 +0000 (10:42 -0600)]
Update generated files for Android
Test: build, flash, run e2fsck
Bug:
27599744
Change-Id: I08a4bb699ae781ba0a368ffac120194b87219c30
Jeff Sharkey [Fri, 21 Oct 2016 16:38:05 +0000 (10:38 -0600)]
Upgrade e2fsprogs to v1.43.3.
This is the latest tagged upstream version, and includes both
security fixes and new features.
$ repo start oct21e .
$ git merge -s ours
2cbf2dae0e542a436cf535dfbc7a8182cb580e86
$ git checkout --detach
2cbf2dae0e542a436cf535dfbc7a8182cb580e86
$ git reset --soft oct21e
$ git checkout oct21e
$ git commit --amend -C HEAD
Test: build, flash, run e2fsck
Bug:
27599744
Change-Id: I42756991c23f56203e3c35913541f19bb05bcfde
Theodore Ts'o [Mon, 5 Sep 2016 01:31:21 +0000 (21:31 -0400)]
Update release notes, etc., for 1.43.3 release
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Sun, 4 Sep 2016 21:31:07 +0000 (17:31 -0400)]
e2fsck: enforce that the extra isize fields in the superblock are sane
Invalid extra isize fields can cause crashes in e2fsprogs and possibly
in the kernel for some architectures due to unaligned accesses.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Sun, 4 Sep 2016 20:29:12 +0000 (16:29 -0400)]
e2fsck: enforce that extra_isize must be a multiple of four
We need to prevent unaligned accesses, so treat any extra_isize which
is not a multiple of four as an bug.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Sun, 4 Sep 2016 19:06:32 +0000 (15:06 -0400)]
Avoid crashing on unaligned pointers from corrupted file systems
On platforms that don't permit unaligned pointer dereferences,
corrupted file systems will as used by the regression test suite can
cause e2fsck and debugfs to crash. Avoid those crashes caused by
corrupted file systems. With this commit the full set of regression
test suites will pass on the sparc64 platform.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Sun, 4 Sep 2016 04:16:35 +0000 (00:16 -0400)]
Fix FreeBSD pmake support
Fix a typo in the @ifNotGNUmake@ case of MCONFIG.in.
Also allow the FORCE_NATIVE_MAKE to force the use of the non-GNU make
optimized Makefile. The resulting makefile will work with GNU Make
4.2.1, although "make V=1" won't be honored.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Sun, 4 Sep 2016 03:33:11 +0000 (23:33 -0400)]
e2fsck: fix timestamps logic for 32-bit systems
Commit
35a4e1b1c5cbb introduced a regression which caused e2fsck on
32-bit systems to think all timestamps were legacy pre-1970
timestamps. Fix the bug.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Fri, 2 Sep 2016 04:49:31 +0000 (00:49 -0400)]
debian: update changelog
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Fri, 2 Sep 2016 03:48:03 +0000 (23:48 -0400)]
debian: don't hide the linker flags for e2fsck.static
The linker command needs to be visible so the blhc scanner can work
correctly.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Fri, 2 Sep 2016 03:13:04 +0000 (23:13 -0400)]
debian: fix build reproducibility problems in the rules file
The configure file needs to be run using a relative pathname so that
when $(srcdir) gets introduced into binary file, the location of the
build directory doesn't find its way into the binaries.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Fri, 2 Sep 2016 02:25:22 +0000 (22:25 -0400)]
Fix build reproducibility for mk_cmds and compile_et
The mk_cmds and compile_et scripts include the build directory, which
breaks the build reproducibility goal of Debian.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Thu, 1 Sep 2016 19:33:11 +0000 (15:33 -0400)]
Update release notes, etc. for 1.43.2 release
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Thu, 1 Sep 2016 19:34:37 +0000 (15:34 -0400)]
config: update config.{guess,sub}
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Thu, 1 Sep 2016 15:37:59 +0000 (11:37 -0400)]
libext2fs: allow the default journal size to go as large as a gigabyte
Recent research has shown that for a metadata-heavy workload, a 128 MB
is journal be a bottleneck on HDD's, and that the optimal journal size
is proportional to number of unique metadata blocks that can be
modified (and written into the journal) in a 30 second window. One
gigabyte should be sufficient for most workloads, which will be used
for file systems larger than 128 gigabytes.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Thu, 1 Sep 2016 04:13:38 +0000 (00:13 -0400)]
e2fsck: fix logic for deciding when to repair legacy timestamp encodings
A static code checker noticed that we had a redundant condition:
if (((sizeof(time_t) <= 4) ||
((sizeof(time_t) > 4) &&
which was caused by the parenthesis were in the wrong place.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Thu, 1 Sep 2016 03:33:42 +0000 (23:33 -0400)]
po: Add Hugarian and Serbian translations
Also update the .gmo files.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Tianze Wang [Thu, 1 Sep 2016 03:14:17 +0000 (23:14 -0400)]
po: update zh_CN.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Yuri Chornoivan [Thu, 1 Sep 2016 03:14:17 +0000 (23:14 -0400)]
po: update uk.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Göran Uddeborg [Thu, 1 Sep 2016 03:14:17 +0000 (23:14 -0400)]
po: update sv.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Jakub Bogusz [Thu, 1 Sep 2016 03:14:17 +0000 (23:14 -0400)]
po: update pl.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Benno Schulenberg [Thu, 1 Sep 2016 03:14:17 +0000 (23:14 -0400)]
po: update nl.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Samuel Thibault [Thu, 1 Sep 2016 03:14:17 +0000 (23:14 -0400)]
po: update fr.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Philipp Thomas [Thu, 1 Sep 2016 03:14:17 +0000 (23:14 -0400)]
po: update de.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Joe Hansen [Thu, 1 Sep 2016 03:14:17 +0000 (23:14 -0400)]
po: update da.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Angel Mompo [Thu, 1 Sep 2016 03:14:17 +0000 (23:14 -0400)]
po: update ca.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Thu, 1 Sep 2016 02:53:07 +0000 (22:53 -0400)]
tune2fs: tell the user that e2fsck -f is required
The message requesting that the user run e2fsck doesn't include the -f
option, and this is needed to force a file system check.
Addresses-Debian-Bug: #828022
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Thu, 1 Sep 2016 00:46:49 +0000 (20:46 -0400)]
e2fsck: fix an alignment problem which causes sparc64 in the journal code
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Wed, 31 Aug 2016 22:37:50 +0000 (18:37 -0400)]
debugfs: fix typo when printing out the dtime label
If the inode has extended timestamps, the dtime was printed with a
label of "crtime". Fix this.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Wed, 31 Aug 2016 22:13:16 +0000 (18:13 -0400)]
debugfs: add the debugfs copy_inode subcommand
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Wed, 10 Aug 2016 22:53:14 +0000 (18:53 -0400)]
Merge branch 'maint' into next
Andreas Dilger [Wed, 10 Aug 2016 22:21:19 +0000 (18:21 -0400)]
fsck: fix strange logic
llvm warns about the confusingly written comparison:
!strncmp(argv[i+1], "-", 1) == 0) {
misc/fsck.c:1178 col 9: warning: logical not is only applied to
the left hand side of comparison [-Wlogical-not-parentheses]
misc/fsck.c:1178 col 9: note: add parentheses after the '!' to
evaluate the comparison first
misc/fsck.c:1178 col 9: note: add parentheses around left hand
side expression to silence this warning
It makes sense to simplify this to a character comparison rather
than using strncmp() to check only one character.
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Adrien Schildknecht [Wed, 10 Aug 2016 21:08:16 +0000 (17:08 -0400)]
libext2fs: add unixfd_io_manager
This new manager is similar to the unix_io_manager except it takes a
file descriptor as first argument instead of a filename.
Some programs may want libext2fs to directly use a fd instead of
letting it opening the file.
The use case for such a io_manager would be to let programs use
a fd even if the filename is unknown:
- the fd comes from a temporary file (O_TMPFILE);
- the fd comes from a unix socket...
Refactoring unix_open() also fix a bug when the IO_DIRECT flag was
specified: ext2fs_get_dio_alignment() was called before the file was
actually opened, resulting in an alignment of 0.
Signed-off-by: Adrien Schildknecht <adriens@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Adrien Schildknecht [Wed, 10 Aug 2016 21:07:00 +0000 (17:07 -0400)]
libext2fs: replace 'unsigned long' by 'uintptr_t'
This is needed for win64:
sizeof(unsigned long) != sizeof(void*)
Signed-off-by: Adrien Schildknecht <adriens@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Adrien Schildknecht [Wed, 10 Aug 2016 20:43:25 +0000 (16:43 -0400)]
libext2fs: reset the size of the zeroing buffer
When a ext2_filsys is freed, ext2fs_zero_blocks2() frees the buffer but
does not reset its size.
If this function is later called with a new ext2_filsys, the code
assumes that the buffer is still valid and return a NULL pointer.
Valgrind output:
==188948== Syscall param pwrite64(buf) points to unaddressable byte(s)
==188948== at 0x4E46D03: __pwrite_nocancel (syscall-template.S:81)
==188948== by 0x1254EC: raw_write_blk (unix_io.c:240)
==188948== by 0x124AAB: unix_write_blk64 (unix_io.c:850)
==188948== by 0x122893: ext2fs_zero_blocks2 (mkjournal.c:204)
Signed-off-by: Adrien Schildknecht <adriens@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Wed, 10 Aug 2016 19:49:35 +0000 (15:49 -0400)]
resize2fs: fix crash when there is an ea block and no blocks to migrate
This fixes a bug introduced in 1.43 by commit
fb47b94fffc: "resize2fs:
rewrite extent/dir/ea block checksums when migrating". If there is an
extended attribute block and there are no blocks that need to migrate,
we will crash.
The bug was caused by a botched De Morgan's transformation.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Matthias Andree [Thu, 21 Jul 2016 23:20:10 +0000 (01:20 +0200)]
libext2fs: fix infinite loop if copying in an empty directory
In m_minrootdir, on FreeBSD 9.3, try_lseek_copy() fails on an empty file
because errcode is uninitialized and the while() loop never executes,
and the errcode garbage is returned.
Initialize errcode = 0 in try_lseek_copy() to avoid a "fail" result when
there was nothing to copy.
Signed-off-by: Matthias Andree <matthias.andree@gmx.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Daeho Jeong [Wed, 6 Jul 2016 00:10:39 +0000 (09:10 +0900)]
e2fsck: update j_tail_sequence after recovery
When journal is released, s_sequence is set to j_tail_sequence.
But, currently, even if the recovery process is successfully completed,
the j_tail_sequence and, finally, s_sequence are never changed. By this,
when we repeat doing power-off the device suddenly and executing e2fsck
without full scan before mount, the s_sequence number will never change
and, in a very rare case, newly generated journal logs will be
surprisingly grafted to the old journal logs. In this case, out-of-date
metadata log can be replayed on the filesystem area and the filesystem
can be crashed unintentionally by journal recovery process. Therefore,
we need to update j_tail_sequence after recovery process is successfully
completed in e2fsck.
Youngjin had repeated this test and found the problem. With our test,
the filesystem crash occurred within 4 hours.
Signed-off-by: Youngjin Gil <youngjin.gil@samsung.com>
Signed-off-by: Daeho Jeong <daeho.jeong@samsung.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Gustavo Zacarias [Wed, 22 Jun 2016 23:58:53 +0000 (20:58 -0300)]
fuse2fs: needs SYSLIBS
It otherwise leads to build failure when using an unbundled libintl.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Wed, 22 Jun 2016 03:16:39 +0000 (23:16 -0400)]
Update configure script to reflect changes from commit
62bc243f1bf
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Eric Sandeen [Thu, 16 Jun 2016 22:51:04 +0000 (17:51 -0500)]
e2undo: fix endian issues
Two new e2undo issues exist in the latest release on big endian
machines.
From sparse check:
undo_io.c:157:26: warning: invalid assignment: |=
undo_io.c:157:26: left side has type restricted __le32
undo_io.c:157:26: right side has type int
undo_io.c:161:26: warning: invalid assignment: &=
undo_io.c:161:26: left side has type restricted __le32
undo_io.c:161:26: right side has type int
e2undo.c:211:16: warning: cast to restricted __le64
e2undo.c:211:16: warning: cast from restricted blk64_t
e2undo.c:212:16: warning: cast to restricted __le64
e2undo.c:212:16: warning: cast from restricted blk64_t
Addresses-RedHat-Bugzilla:
1344636
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Mon, 13 Jun 2016 01:42:47 +0000 (21:42 -0400)]
debugfs: fix logdump to work on files > 2GB
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Ingo Brückl [Thu, 9 Jun 2016 20:56:50 +0000 (16:56 -0400)]
misc: don't unconditionally install manual page for fuse2fs
Only install the manual page if fuse2fs itself will be installed.
Signed-off-by: Ingo Brückl <ib@wupperonline.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Gustavo Zacarias [Thu, 9 Jun 2016 20:56:15 +0000 (16:56 -0400)]
fuse2fs: might need librt
It uses clock_gettime() which in older glibc versions is in librt.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Wed, 8 Jun 2016 19:45:26 +0000 (15:45 -0400)]
Update release notes, etc. for 1.43.1 release
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Matthias Andree [Wed, 8 Jun 2016 18:26:38 +0000 (14:26 -0400)]
libblkid: avoid DIOCGDINFO where missing.
FreeBSD 11 will remove the DIOCGINFO ioctl(), so check if it is defined
before referencing it.
Signed-off-by: Matthias Andree <matthias.andree@gmx.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Tue, 7 Jun 2016 17:36:47 +0000 (13:36 -0400)]
Remove the last of behaviour-specific checks on EXT2_OS_LINUX
If there is a feature check, we can just depend on the feature check.
If it is something that can't be checked via a feature flag, then
instead of checking for EXT2_OS_LINUX, we should instead check for
*NOT* EXT2_OS_HURD. since HURD is the special case.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Tue, 7 Jun 2016 16:46:24 +0000 (12:46 -0400)]
tests: suppress use of libmagic when running the regression test suite
How libmagic will behave is not necessarily stable across different
operating systems of versions of libmagic (or the magic number
database). So suppress it to avoid false test failures.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Tue, 7 Jun 2016 15:52:25 +0000 (11:52 -0400)]
tests: disable some tests for FreeBSD
Unfortunately, FreeBSD doesn't support sparse files in their tmpfs,
and they generlaly don't mount a tmpfs on /tmp anyway. As a result
certain tests will either OOM kill a FreeBSD (if tmpfs is in use) or
will take forever (if it is not in use).
So let's turn off some tests for FreeBSD (m_hugefile is disabled on
MacOS already, for similar reasons). We need to find a better
solution in the long term, but for now, these tests are guaranteed to
be a disaster on FreeBSD, so suppress them for now.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Tue, 7 Jun 2016 15:47:40 +0000 (11:47 -0400)]
tune2fs,resize2fs: special case HURD only when testing s_creator_os
The s_creator_os field was a mistake, given how Hurd has been
ab(using) certain file system fields. We should skip support for
certain advanced features (64-bit support, metadata checksums) for
file systems created on the Hurd OS only, instead of only supporting
them for file systems created on Linux. This fixes various regression
test failures for FreeBSD.
(The regression tests are probably mostly hopeless for Hurd anyway,
but given the HURD abuse's of various file system fields, the HURD is
going to have to be given second-class treatment in any case, given
what they decided to do with ext2 support, which locks them out of the
more advanced file system features, anyway.)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Tue, 7 Jun 2016 15:44:54 +0000 (11:44 -0400)]
libext2fs: fix EXT2FS_PRETEND_* on non-Linux systems
The debugging environment variables EXT2FS_PRETEND_* were implemented
in check_mntent_file(), and this function isn't called on all
operating systems. Lift this code up to ext2fs_check_mount_point(),
so that these environment variables (which are used in the regression
test suite) will work on all platforms.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Matthias Andree [Tue, 7 Jun 2016 14:50:12 +0000 (10:50 -0400)]
Fix dbg_print() format for unsigned long long.
Signed-off-by: Matthias Andree <matthias.andree@gmx.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Tue, 7 Jun 2016 14:47:20 +0000 (10:47 -0400)]
tests: teach test_script the --failed option
Teach test_script the --failed option, which asks it to rerun the
tests that had previously failed.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Tue, 7 Jun 2016 04:16:17 +0000 (00:16 -0400)]
libext2fs: don't use $(LDFLAGS_STATIC) when linking test programs
The tst_* progams aren't intended to be linked 100% stically; they
just link against some of the static libraries. So use $(ALL_LDFLAGS)
and not $(LDFLAGS_STATIC).
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Tue, 7 Jun 2016 04:14:35 +0000 (00:14 -0400)]
configure: fix detection of dlopen() for BSD systems
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Tue, 7 Jun 2016 05:01:22 +0000 (01:01 -0400)]
Merge branch 'maint' into next
Theodore Ts'o [Tue, 7 Jun 2016 03:04:43 +0000 (23:04 -0400)]
libext2fs: fix Direct I/O fallback code so it implements RMW correctly
There is a bug in Unix I/O manager where if an aligned I/O is
required, it does not correctly do the read-modify-write cycle
correctly. Specifically, it was not doing an lseek between the read
and the write calls, so the update was going to block N+1 instead of
block N. Oops.
Fortunately in practice we almost never use this fallback path, so
file systems weren't getting horribly corrupted, because (a) we almost
never use Direct I/O in e2fsprogs, at least not by default, and (b)
when we do the buffers end up being aligned anyway, so it's OK.
We only noticed this because the new Undo I/O manager in e2fsprogs
1.43 was doing unaligned I/O and FreeBSD requires that I/O requests be
aligned even if you are not doing Direct I/O, and the e2undo
regression tests were all failing as a result.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Mon, 6 Jun 2016 20:49:37 +0000 (16:49 -0400)]
tests,debugfs: ea_set's "-f <value_file" needs to be before the other args
For systems that don't use GNU's getopt(3), options have to be before
all non-option arguments. So change the usage message for debugfs's
ea_set command, and then fix the d_xattr_sorting test.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Mon, 6 Jun 2016 20:19:11 +0000 (16:19 -0400)]
e2undo: #include <libgen.h> since we use basename()
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Matthias Andree [Mon, 6 Jun 2016 04:54:11 +0000 (00:54 -0400)]
tests: use tar xf -, some tars default to tape dev.
FreeBSD's tar defaults to reading from /dev/sa0 when no -f option is
given, so turn "tar x" into "tar xf -" on j_corrupt_ext_jnl_sb_*.
Signed-off-by: Matthias Andree <matthias.andree@gmx.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Mon, 6 Jun 2016 03:18:30 +0000 (23:18 -0400)]
mke2fs: warn if user provides a label which is too long
Addresses-Debian-Bug: #791630
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Sat, 4 Jun 2016 03:37:28 +0000 (23:37 -0400)]
debugfs: clarify man page for the -b and -s options
Addresses-Debian-Bug: #766379
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Sat, 4 Jun 2016 03:28:33 +0000 (23:28 -0400)]
Add clarifications to the e4defrag and resize2fs man pages
Addresses-Debian-Bug: #761144
Addresses-Debian-Bug: #770750
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
by 1 commit.
Theodore Ts'o [Sat, 4 Jun 2016 03:09:58 +0000 (23:09 -0400)]
Document when ext2/3/4 features were added to the kernel
Document when ext2/3/4 features were added to the kernel in the
ext4(5) man page.
Addresses-Debian-Bug: #428361
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Pete Haddow [Fri, 3 Jun 2016 09:45:41 +0000 (10:45 +0100)]
Clarify and clean up the ext4(5) man page
Signed-off-by: Pete Haddow <pete@leptonyx.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Fri, 3 Jun 2016 03:26:57 +0000 (23:26 -0400)]
debugfs.8, e2fsck.8: clarify man pages these programs can operate on files
Addresses-Debian-Bug: #766127
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Fri, 3 Jun 2016 03:05:11 +0000 (23:05 -0400)]
debugfs: fix rdump so it can start from the root directory
Previously "rdump / /tmp/out" would fail with the error message:
rdump: File exists while making directory /tmp/out/
Also fix the fast symlink detection logic so that it works when a
symlink has one or more extended attributes.
Addresses-Debian-Bug: #766125
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Fri, 3 Jun 2016 02:40:41 +0000 (22:40 -0400)]
misc: fix gcc -Wall complaints
Especially when compiling for a 32-bit architecture.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Tue, 31 May 2016 06:05:50 +0000 (02:05 -0400)]
debian: disable tdb when building the binaries for the udebs
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Tue, 31 May 2016 05:49:46 +0000 (01:49 -0400)]
debian: change e2fsprogs to Suggests, instead of Recommends fuse2fs
Recommends is too strong of a dependency to use here.
Addresses-Debian-Bug: #825868
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Tue, 31 May 2016 05:48:18 +0000 (01:48 -0400)]
debian: don't build the fuse2fs package for the Hurd OS
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Tue, 31 May 2016 05:27:24 +0000 (01:27 -0400)]
debian: adjust how we build hardened binaries to avoid blhc complaints
Avoid false positives for blhc. Also, build the object files for the
static library using -fPIE so they can be linked with a shared
executable linked with -pie.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Tue, 31 May 2016 05:25:58 +0000 (01:25 -0400)]
lib: build elf shared libraries using -fPIC -shared
Make sure we use "-fPIC -shared" consistently on linker and compiler
command lines when building or linking the shared objects for the ELF
shared library.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Mon, 30 May 2016 03:35:13 +0000 (23:35 -0400)]
Fix Android build warnings
Also fix some additional gcc -Wall build warnings in a traditional
Linux environment.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Mon, 30 May 2016 00:48:54 +0000 (20:48 -0400)]
Add configure --disable-tdb which disables e2fsck's scratch_files feature
The scratch_files feature is not really needed except on 32-bit
platforms, since tdb's performance is pretty awful given how we are
using it. Maybe SQLite would be faster, but for 64-bit platforms,
enabling swap works fairly well, especially using the rbtree for the
bitmap abstraction.
We leave tdb for Android since it's unlikely that someone will be
trying to connect petabyte+ sized file systems to a mobile handset.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Sun, 29 May 2016 21:36:43 +0000 (17:36 -0400)]
libsupport: fix gcc -Wall nits
Also add better error checking to mke2fs and e2fsck's calls to quota
functions in libsupport.a.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Sun, 29 May 2016 21:07:17 +0000 (17:07 -0400)]
Fix "make gcc-wall" for library code
Commit
fd1677e80: "Add --enable-hardening which builds e2fsprogs with
security hardening" broken the gcc warnings mode by changing how
CFLAGS were used to build static and shared library objects.
Also shut up GCC's whining about casting the return value from
dlsym(2) to function pointers --- since due to conflicing standards,
there is no way to use dlsym() without causing gcc to whine one way or
another.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Sun, 29 May 2016 17:36:20 +0000 (13:36 -0400)]
e2fsck,resize2fs: fix gcc -Wall nits
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Sun, 29 May 2016 17:33:58 +0000 (13:33 -0400)]
Android.mk: add parse_qtype.c the list of source files
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Sun, 29 May 2016 05:07:40 +0000 (01:07 -0400)]
tests: fix f_pre_1970_date_encoding on systems with a 32-bit time_t
Signed-off-by: Theodore Ts'o <tytso@mit.edu>