Commit Graph

5531 Commits (4e52870eeb08ed7532bf4fd3d5cb1538f714bdc8)

Author SHA1 Message Date
Theodore Ts'o 4e52870eeb Update release notes, etc., for 1.43.3 release
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-09-04 21:31:21 -04:00
Theodore Ts'o 047d5d774f 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>
2016-09-04 17:41:20 -04:00
Theodore Ts'o a7b27f11a1 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>
2016-09-04 16:34:49 -04:00
Theodore Ts'o 8d7a63921f 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>
2016-09-04 15:06:32 -04:00
Theodore Ts'o f3bc1561c8 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>
2016-09-04 00:16:35 -04:00
Theodore Ts'o 254195627f e2fsck: fix timestamps logic for 32-bit systems
Commit 35a4e1b1c5 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>
2016-09-03 23:33:11 -04:00
Theodore Ts'o 7b714fe277 debian: update changelog
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-09-02 00:49:31 -04:00
Theodore Ts'o cd0567982b 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>
2016-09-01 23:48:03 -04:00
Theodore Ts'o 98e858bf9d 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>
2016-09-01 23:13:04 -04:00
Theodore Ts'o a2143b5160 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>
2016-09-01 22:25:22 -04:00
Theodore Ts'o f6acc1212d Update release notes, etc. for 1.43.2 release
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-09-01 15:46:32 -04:00
Theodore Ts'o a7c023f4df config: update config.{guess,sub}
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-09-01 15:35:17 -04:00
Theodore Ts'o bbd2f78cf6 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>
2016-09-01 11:37:59 -04:00
Theodore Ts'o 35a4e1b1c5 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>
2016-09-01 01:01:54 -04:00
Theodore Ts'o abae029024 po: Add Hugarian and Serbian translations
Also update the .gmo files.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-09-01 01:01:54 -04:00
Tianze Wang 57d6927dc8 po: update zh_CN.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-09-01 01:01:54 -04:00
Yuri Chornoivan 935fdb9935 po: update uk.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-09-01 01:01:54 -04:00
Göran Uddeborg 57bbbb813d po: update sv.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-09-01 01:01:53 -04:00
Jakub Bogusz d0c9ac4886 po: update pl.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-09-01 01:01:53 -04:00
Benno Schulenberg b9e09a9d02 po: update nl.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-09-01 01:01:53 -04:00
Samuel Thibault 7ef3cf2489 po: update fr.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-09-01 01:01:53 -04:00
Philipp Thomas a4670b9e78 po: update de.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-09-01 01:01:53 -04:00
Joe Hansen 1e000f89d3 po: update da.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-09-01 01:01:53 -04:00
Angel Mompo 60836c6361 po: update ca.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-09-01 01:01:53 -04:00
Theodore Ts'o 4d4335323e 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>
2016-09-01 01:01:53 -04:00
Theodore Ts'o c4d54aa2f7 e2fsck: fix an alignment problem which causes sparc64 in the journal code
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-09-01 01:01:53 -04:00
Theodore Ts'o 22137497fa 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>
2016-09-01 01:01:48 -04:00
Theodore Ts'o b199291909 debugfs: add the debugfs copy_inode subcommand
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-08-31 18:13:16 -04:00
Theodore Ts'o 9a23fa8334 Merge branch 'maint' into next 2016-08-10 18:53:14 -04:00
Andreas Dilger 713edbd082 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>
2016-08-10 18:21:19 -04:00
Adrien Schildknecht 4ccf9e4fe1 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>
2016-08-10 17:08:16 -04:00
Adrien Schildknecht d4e5abfb1b 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>
2016-08-10 17:07:00 -04:00
Adrien Schildknecht 5cc6db0c82 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>
2016-08-10 16:43:25 -04:00
Theodore Ts'o 3d6fc97483 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>
2016-08-10 16:00:17 -04:00
Matthias Andree c2c5c58593 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>
2016-07-23 12:40:17 -04:00
Daeho Jeong 32448f50df 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>
2016-07-05 23:10:21 -04:00
Gustavo Zacarias 49aa3ff1f1 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>
2016-07-05 22:59:45 -04:00
Theodore Ts'o c94da0475a Update configure script to reflect changes from commit 62bc243f1b
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-06-21 23:16:39 -04:00
Eric Sandeen 32bf36dc0f 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>
2016-06-21 23:10:40 -04:00
Theodore Ts'o 5eca88c1dc debugfs: fix logdump to work on files > 2GB
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-06-12 21:42:47 -04:00
Ingo Brückl 7bd03cf6a1 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>
2016-06-09 16:56:50 -04:00
Gustavo Zacarias 62bc243f1b 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>
2016-06-09 16:56:15 -04:00
Theodore Ts'o 48203a389d Update release notes, etc. for 1.43.1 release
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-06-08 15:45:26 -04:00
Matthias Andree 434413ccde 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>
2016-06-08 14:26:38 -04:00
Theodore Ts'o c0495d96fd 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>
2016-06-07 13:36:47 -04:00
Theodore Ts'o 726b21b5d2 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>
2016-06-07 12:46:24 -04:00
Theodore Ts'o 55e8032363 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>
2016-06-07 11:52:25 -04:00
Theodore Ts'o 81f965a04d 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>
2016-06-07 11:47:40 -04:00
Theodore Ts'o 43b7b054cd 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>
2016-06-07 11:44:54 -04:00
Matthias Andree afaf6db69f 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>
2016-06-07 10:50:12 -04:00