Commit Graph

6263 Commits

Author SHA1 Message Date
Göran Uddeborg
4490f853e1 po: update sv.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-18 14:28:35 -04:00
Antonio Ceballos
615b38cd29 po: update es.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-18 14:28:35 -04:00
Joe Hansen
1d32c06e2f po: update da.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-18 14:28:35 -04:00
Theodore Ts'o
dd3b4cc367 libext2fs: fix uninitialized length in rep_strdup()
For platforms whose libc don't supply strdup(), the replacement strdup
function in lib/ext2fs/tdb.c needs to always initialize the length
variable.

Reported-by: Vladyslav Tsilytskyi <ykp@protonmail.ch>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-18 13:32:25 -04:00
Theodore Ts'o
0afb9be6aa Drop subset tarball and replace it with "configure --enable-subset"
There's no point creating two separate tarfiles.  It's not clear
anyone was actually using the subset tarball --- and if they are, they
can replace it by the full source distribution and using the
--enable-subset option.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-18 11:21:30 -04:00
Theodore Ts'o
e5f0f3eebe Stop generating e2fsprogs.spec automatically
It adds extra complexity for not much gain, and stands in the way of
generating the release tarfile via git archive.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-18 11:06:23 -04:00
Theodore Ts'o
ef9186ea43 Remove obsolete files from the repository
They are removed when we generate the tarball, and they serve no
useful purpose, so let's remove them.  This will be help us to create
the tarball using git archive more easily.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-18 09:55:26 -04:00
Theodore Ts'o
748d60575c gen-tarball: handle symlinks correctly in the created the tar file
Now that we use a symlink for the top-level RELEASE-NOTES file, the
previous strategy of using a symlink to force the prefix in the tar
file and then using tar -h won't work.  So change how we generate the
tar file to take advantage of GNU tar's --transform option.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-18 00:06:40 -04:00
Theodore Ts'o
139a30928a configure: don't enable LTO by default
Not all compilers (or versions of compilers) use the same LTO options
or behave the same way with LTO.  In particular, using clang and the
current LTO options cause the build to fail.  We should probably fix
up the configure script to handle Clang and LTO, but for now, we won't
enable LTO unless the user explicitly passes --enable-lto to the
configure script.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-17 22:26:24 -04:00
Theodore Ts'o
f7260c1974 debugfs: fix missing variable rename in debugfs.h
This should have been part of commit 2fcbcb1b9e: "Fix function
declarations for ss commands to fix LTO warnings".

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-15 22:06:16 -04:00
Lukas Czerner
80a55276b3 tests: mke2fs must not create fs with resize_inode and meta_bg
Test that mke2fs does not allow to create file system with both
resize_inode and meta_bg features enabled.

This was fixes with commit 42e77d5d ("libext2fs: don't create
filesystems with meta_bg and resize_inode").

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-14 13:06:19 -04:00
Lukas Czerner
99a0dffcd3 tests: e2fsck must be able fix fs with resize_inode and meta_bg
Test if the e2fsck can fix file system with resize_inode and meta_bg
features enabled simultaneously.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-14 10:04:42 -04:00
Theodore Ts'o
2ca70c2253 Merge branch 'maint' into next 2018-08-13 22:40:15 -04:00
Theodore Ts'o
faae7aa00d Reserve codepoints for the fsverity feature.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-13 22:39:27 -04:00
Theodore Ts'o
ac5936d78d e2fsck: fix fd leak in reserve_stdio_fds
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Lukas Czerner <lczerner@redhat.com>
2018-08-13 21:32:55 -04:00
Theodore Ts'o
4cf064e051 debian: use debhelper compat level 11 with a fallback to compat level 9
The dh_installsystemd command is only available with Debhelper v11 and
higher.  So explicitly declare that we need debhelper 11, and create a
fallback for debhelper compat level 9 (so we can easily backport to
Debian Stretch and Ubuntu 16.04).

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-12 00:30:07 -04:00
Lukas Czerner
06a276e2c3 remove unused datarootdir
Remove unused datarootdir variable from compile_et and mk_cmds.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-11 20:13:18 -04:00
Lukas Czerner
74848259f0 e2fsck: remove resize inode if both resize_inode and meta_bg are enabled
Previous e2fsprogs versions allowed to create a file system with both
resize_inode and meta_bg enabled. This was fixed by upstream commit
42e77d5d ("libext2fs: don't create filesystems with meta_bg and resize_inode")

However e2fsck still does not recognize the conflict and will attempt to
clear and recreate resize_inode if it's corrupted due to this incompatible
feature combination, though it will create it in the same wrong layout.

Fix it by teaching e2fsck to recognize resize_inode and meta_bg
conflict and fixing it by disabling and clearing resize inode.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-11 19:04:38 -04:00
Ross Burton
5abc041492 build: use MKDIR_P instead of MKINSTALLDIRS
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-11 15:29:48 -04:00
Fedor Uporov
cdca044059 libext2fs: support devices w/ non-512 byte block size on Apple Darwin
Signed-off-by: Fedor Uporov <thisisadrgreenthumb@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-11 14:01:56 -04:00
Theodore Ts'o
4971570449 Fix LTO builds so debugging information is preserved
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-08 22:16:07 -04:00
Theodore Ts'o
57e976e20e MCONFIG: move SANITIZER_CFLAGS out of CLFAGS
CFLAGS is supposed to be something that can be overridden by the
developer.  So extra stuff like $(SANITIZER_CFLAGS) should not be
defined there, but rather in ALL_CFLAGS.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-08 21:33:27 -04:00
Theodore Ts'o
3882fb463c e2fsck: fix LTO type warnings
The jfs_user.h, which is used by the journal functions didn't include
config.h before including e2fsck.h.  This caused the e2fsck structure
to be different compared how it's compiled for the other e2fsck source
files.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-08 21:23:59 -04:00
Theodore Ts'o
2fcbcb1b9e Fix function declarations for ss commands to fix LTO warnings
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-08 19:59:40 -04:00
Theodore Ts'o
83d9ffccf3 libext2fs: revamp bitmap types to fix LTO warnings
We play games with pointers to incomplete types to handle subclassing
using the C language, use the first four bytes (the magic number)
field to disambiguate between different subclasses.  The way we were
doing it before, we relied defining the structure differently
depending on the C file implementing different backend subclasses.

This triggers LTO warnings, since it appears (and in fact, we are)
using functions defined with different types than how they were
defined by calling C file.

Fix the LTO warnings by using an explicit base bitmap structure, and
then casting it to the 32-bit or 64-bit variant as needed.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-08 13:53:11 -04:00
Darrick J. Wong
bcca786b83 enable thread sanitizer if the builder wants it
Enable the gcc/clang thread data corruption sanitizer if the builder
requests it and it's available.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-08 11:16:15 -04:00
Darrick J. Wong
5e666e3d88 enable gcc/clang address sanitizer if the builder wants it
Enable AddressSanitizer to look for memory usage errors if the builder
asks for it and it's available.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-08 11:16:12 -04:00
Darrick J. Wong
1c2a76aeb0 enable UBSAN if the builder wants it
Enable the undefined behavior sanitizer (ubsan) if the builder requests
it and it's available.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-08 11:16:09 -04:00
Darrick J. Wong
4aece3281e enable link time optimization, if requested
Enable link time optimization (LTO) if the builder requests it.  The
extra link optimization results in smaller binaries.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-08 11:16:03 -04:00
Theodore Ts'o
b905cd4f8f debian: use dh_installsystemd instead of manual handling in the scripts
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-08 10:43:44 -04:00
Darrick J. Wong
a2df58945c e2scrub: add service (cron, systemd) support
Add the ability to run the e2scrub utilities as a periodically scheduled
system service.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-05 14:59:40 -04:00
Darrick J. Wong
a089aec341 e2scrub: create a script to scrub all ext* filesystems
Create an e2scrub_all command to find all ext* filesystems
and run an online scrub against them all.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-05 14:43:12 -04:00
Darrick J. Wong
5ce368f07c e2scrub: create online fsck tool of sorts
Implement online fsck for ext* filesystems which live on LVM-managed
logical volumes.  The basic strategy mirrors that of e2croncheck --
create a snapshot, fsck the snapshot, report whatever errors appear,
remove snapshot.  Unlike e2croncheck, this utility accepts any LVM
device path, knows about snapshots running out of space, and can call
fstrim having validated that the fs metadata is ok.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-05 14:43:12 -04:00
Darrick J. Wong
2b17b98e41 tune2fs: allow setting the filesystem error bit
Allow the administrator to mark the filesystem's error bit to force a
fsck at the next mount.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Reviewed-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-05 14:43:12 -04:00
Isaac Chen
f4f701db32 AOSP: ODR violation in e2fsck during host build
Signed-off-by: Theodore Ts'o <tytso@mit.edu>

Bug: 112062612
Test: $ m SANITIZE_HOST=address $OUT_DIR/host/linux-x86/bin/e2fsck $OUT_DIR/host/linux-x86/bin/llvm-symbolizer
      $ $OUT_DIR/host/linux-x86/bin/e2fsck

Change-Id: I3f1a18d6d72116d864a79f0acef37625124f4c1a
From AOSP commit: 3271c69c97f486914fea833a36eaf5d86938c76d
2018-08-05 14:17:16 -04:00
David Anderson
aa975a572d AOSP: Fix macOS build.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>

Bug: 111839488
Test: e2fsprogs builds on macOS.
Change-Id: I4ddf332cc244fa44f928cba68470b7f9aa48a556
From AOSP commit: 4dc2456f0e6d10c73372e829e1875ec4095e8fa6
2018-08-05 13:58:26 -04:00
David Anderson
0958bc6327 AOSP: Update Android.bp files.
debugfs now links to a new libext2_support library, which only includes
cstring.c (Android separates other pieces of libsupport into separate
libraries).

e2fsck now builds with -Wno-unused-variable to work around an unused
variable introduced by cabde4999d.

libext_e2p builds the new ljs.c file, and links to ws2_32 on Windows for
ntohl().

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

Change-Id: I42edce0478f1529f44acdbef1495ec5270e3a61e
From AOSP commit: af14814afe0cb3389ecc4b9e9422bd7e8962e0ed
2018-08-05 13:54:26 -04:00
David Anderson
8f1b0898ac AOSP: e2fsck: Remove unused variable.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>

Bug: N/A
Test: e2fsck builds
Change-Id: I48e33920d8aa369808fb47143f2a46ecaa03f6c3
From AOSP commit: 4d2e95e15a4df94e556c2bfbf77b7b1d8e43b446
2018-08-05 13:42:18 -04:00
David Anderson
c4062e7acf AOSP: Always define HAVE_SYS_SYSMACROS_H on Android.
This is needed after 3fb715b554 which
conditionally included sysmacros.h.

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

Change-Id: I52e3da4d9ea0f5efbf685a9c4a266f33357f8d8c
From AOSP commit: a5deff7b7ee15a5ba5d65516326ce4c42daa1027
2018-08-05 12:22:42 -04:00
David Anderson
dfae277e8b AOSP: Conditionally define __bitwise__ on Android.
bionic does not define _LINUX_TYPES_H but does define __bitwise, so we
conditionally define it here.

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

Change-Id: I500ccd469ea7de2e53ab8bd75720a412c86cf18b
From AOSP commit: 77f2eea2717e18e80a31d80c7721b9e0ed8e0cba
2018-08-05 12:20:39 -04:00
Jaco Kroon
4a30e2ae7c debugfs: fix ncheck so it handles hard links correctly
Due to hard links inodes can have multiple names (except for folders),
ncheck should find all of the names (equal to the number of links to the
inodes, directories excepted), not names to the count of the provided
inodes.

Signed-off-by: Jaco Kroon <jaco@uls.co.za>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-05 12:07:20 -04:00
Theodore Ts'o
31ee367e97 debian: stop using symlinks to save space on *-dev packages
Using symlinks to save space on duplicate copies of the
/usr/share/doc/*/changelog.Debian.gz is a bit of a mess, since when
the foo-dev package is removed, the files in /usr/share/doc/libfoo/*
get removed, which means the copyright file gets removed.

So stop doing this altogether, and set up maintainer scripts to clean
up the mess so that the symlinks are removed when the packages get
upgraded.

Addresses-Debian-Bug: #905195
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-04 21:06:19 -04:00
Lukas Czerner
94f20cd515 resize2fs: Remove the real kilobytes rant from man page
Remove the rant about the "real" kilobytes from the man page and just
make it more clear that the suffixed units are representing power-of-two
units as we do in mke2fs man page. Also add terabytes to the list.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-07-22 15:03:03 -04:00
David Anderson
4eca2aef6a AOSP: e2fsdroid: Fix crash with invalid command line args
If a sparse file fails to load, an inconsistent channel pointer will be
returned, causing e2fsdroid to crash on exit.

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

Bug: 64109868
Change-Id: If1606c7c49d5569323db5b5fce4826f24ba76383
From AOSP commit: 0f31d29a968eed6dc3c96eb47fd34e8608a2580c
2018-07-20 18:49:35 -04:00
Lonnie Abelbeck
59c2913cb4 e2fsprogs: fix non-three-char month in version.h
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-07-20 10:57:09 -04:00
Li Dongyang
fddc423dc6 Fix compile error and warnings for old gcc versions
-Wimplicit-fallthrough option was added in gcc7 and
-Wpedantic was added in gcc4.8, while #pragma GCC diagnostic
support was not available until gcc4.6

We got following warnings:
../lib/ext2fs/fiemap.h:35: warning: expected [error|warning|ignored] after ‘#pragma GCC diagnostic’
../lib/ext2fs/fiemap.h:36: warning: unknown option after ‘#pragma GCC diagnostic’ kind
../lib/ext2fs/fiemap.h:38: warning: expected [error|warning|ignored] after ‘#pragma GCC diagnostic’

and error:
filefrag.c: In function ‘main’:
filefrag.c:577: error: #pragma GCC diagnostic not allowed inside functions
filefrag.c:578: error: #pragma GCC diagnostic not allowed inside functions
filefrag.c:595: error: #pragma GCC diagnostic not allowed inside functions

when compiling latest e2fsprogs with a gcc older than 4.6
e.g. on CentOS 6.9

Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-07-14 20:46:30 -04:00
Theodore Ts'o
e96393142c blkid: avoid FPE crash when probing a HFS+ superblock with a zero blocksize
This problem was reported by Adam Buchbinder.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-07-10 18:12:54 -04:00
Theodore Ts'o
85e53f42f9 Update release notes, etc., for the 1.44.3 release
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-07-10 01:40:38 -04:00
Theodore Ts'o
ffb192c06b debian: update standards version to 4.1.5
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-07-10 01:14:26 -04:00
Theodore Ts'o
8dd6953923 libext2fs: install hashmap.h since it is needed by libext2fs.h
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-07-08 11:52:53 -04:00