The nonempty option isn't supported by fuse3, and so if fusermount is
from fuse3, having fuse2fs specify nonempty automatically will prevent
fuse2fs from working correctly.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
The xgettext program is incorrectly marking e2fsck problem
descriptions as being c-style printf strings. Override its mistakes.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
The strings in e2fsck/problem.c use a special %-expansion scheme,
where %b gets expanded to a block number, %i gets expanded to an inode
number, etc., where these values are in a problem context data
structure. As such, there is no need to use a printf style positional
indicator (e.g., %2$s). Indeed, the use of things like %1$i or %2$b
will cause the %-expansion code to just print %1$i or %2$b, instead of
the inode or block number, respectively.
Addresses-Debian-Bug: #892173
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: Philipp Thomas <pth@suse.de>
Cc: Benno Schulenberg <vertaling@coevern.nl>
Cc: Trần Ngọc Quân <vnwildman@gmail.com>
Cc: Petr Pisar <petr.pisar@atlas.cz>
By default, e2scrub_all will not actually trigger online scrubs unless
periodic_e2scrub=1 is set in /etc/e2scrub.conf.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Defining HAVE_NETINET_IN_H for Alpha and __NO_STRING_INLINES for the
PowerMac QUICK bootloader date back to over two decades, to 1997 and
1998, respectively. These two architectures are no longer supported
by Debian, and it's not clear they are actually needed in 2019 even
for someone building for these architectures. So let's drop them and
see if anyone complains (or notices).
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
The e2scrub_all program was broken by commit c7d6525eca
("e2scrub_all: refactor device probe loop") so that it would use the
path of the snapshot volume instead of the base volume. This caused
"e2scrub_all -r" to pass the wrong pathname to e2scrub, with the
result that e2scrub would abort with an error instead of removing the
snapshot volume.
Fixes: c7d6525eca ("e2scrub_all: refactor device probe loop")
Addresses-Debian-Bug: #931679
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
The ability to not build udebs packages and e2fsck-static made sense
when we were doing a separate e2fsprogs builds for those packages.
Since we're not doing that any more, we can simplify things by
dropping that flexibility.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Previously, we configured and built a separate version of e2fsprogs
for the e2fsprogs-udeb package. This was important back when we still
cared about build floppies, but going to extra lengths to save 145k of
disk space isn't worth it any more.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
We handle the case where an LVM's PV is stacked on top of a dm-crypt
device, but not the case where it's the other way around, where a LVM
LV contains a LUKS encrypted file system. Fix this oversight.
Addresses-Debian-Bug: #931387
Reported-by: Marc Haber <mh+debian-bugs@zugschlus.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Historically, e2fsck has required that directories not contain holes.
(In fact, as of this writing, ext4 still requires this to be the
case.) Commit ae9efd05a9 ("e2fsck: 3 level hash tree directory
optimization") removed this requirement if the large_dir feature is
enabled; however, the way it was done caused it to incorrectly handle
inline directories.
To reproduce the problem fixed by this commit:
truncate -s 100000000 ext4.img
misc/mke2fs -t ext4 -I 512 -O 'inline_data,large_dir' ext4.img
mkdir m
sudo mount ext4.img m
mkdir m/aa
sudo umount m
e2fsck/e2fsck -f -n ext4.img
The last command gives this output:
[root@localhost e2fsprogs-kernel]# e2fsck/e2fsck -f -n ext4-2.img
e2fsck 1.45.2 (27-May-2019)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
'..' in /aa (12) is <The NULL inode> (0), should be / (2).
Fix? no
Pass 4: Checking reference counts
Inode 2 ref count is 4, should be 3. Fix? no
Inode 12 ref count is 2, should be 1. Fix? no
Pass 5: Checking group summary information
ext4-2.img: ********** WARNING: Filesystem still has errors **********
ext4-2.img: 12/24384 files (0.0% non-contiguous), 17874/97656 blocks
Reported-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Artem Blagodarenko <c17828@cray.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Almost all posix_ functions return a positive errno value (without
setting errno) rather than -1 and setting errno. Most calls in this
project were correct, but these two weren't.
Reported-by: Hughes <enh@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
We already have the "SERVICE_MODE=1" feature that signals to e2scrub
that we're running as a background daemon and therefore we should exit
quietly if conditions aren't right.
It's therefore unnecessary to have a separate -C flag to achieve the
same outcome for cron jobs. Merge the two together.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Test that e2fsck doesn't report errors when an inode with the 'verity'
flag has blocks past i_size.
This is a regression test for commits 3baafde6a8 ("e2fsck: allow
verity files to have initialized blocks past i_size") and 43466d0396
("e2fsck: handle verity files in scan_extent_node()").
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
In some cases if the translation file is missing some translations,
mke2fs can end up printing an English message, e.g.:
% LANG=it_IT.UTF-8 ./mke2fs /tmp/foo.img 8M
mke2fs 1.45.1 (12-May-2019)
/tmp/foo.img contiene un file system ext4
created on Mon May 27 19:35:48 2019
Proceed anyway? (y,N)
However, if there is a translation for string to match with "yY"
(e.g., to "sS" for Italian), then 'y' won't work. Fix this by falling
back to the english 'yY' characters.
Addresses-Debian-Bug: #907034
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Don't report PR_1_EXTENT_END_OUT_OF_BOUNDS on verity files during
scan_extent_node(), since they will have blocks stored past i_size.
This was missed during the earlier fix because this check only triggers
if the inode has enough extents to need at least one extent index node.
This bug is causing one of the fs-verity xfstests to fail with the
reworked fs-verity patchset.
Fixes: 3baafde6a8 ("e2fsck: allow verity files to have initialized blocks past i_size")
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Running lsblk when there are no valid block devicse results in
generating all block devices as the list of devices to scrub; this
results in a lot of e2scrub_all failures.
Addresses-Debian-Bug: #929186
Signed-off-by: Theodore Ts'o <tytso@mit.edu>