Whamcloud - gitweb
Adrien Schildknecht [Wed, 23 Nov 2016 18:21:42 +0000 (10:21 -0800)]
AOSP: android: libext2fs and com_err for windows
Test: m libext2fs-host && m libext2_com_err-host
Change-Id: I92b6717b617a4f7f16182bf12af58cb22f20fa8f
From AOSP commit:
1538eb4c580d53657f82e4e0170ca5ad5b67455c
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Jin Qian [Tue, 6 Dec 2016 01:49:41 +0000 (17:49 -0800)]
Fix windows and mac build
malloc.h is not available on mac.
mntent.h and setmntent are not available on windows.
Test: cd external/e2fsprogs && mm
Change-Id: I3bc1b80156d3659f4d81975626a71f58d39ee61a
(cherry picked from commit
8ca6180b52349968daf601bd89e15491eb2f271f)
Elliott Hughes [Mon, 5 Dec 2016 21:33:29 +0000 (13:33 -0800)]
AOSP: _GNU_SOURCE must be defined before any #include.
Fixes the "asprintf undeclared" warning in this code.
Bug: N/A
Test: builds
Change-Id: I42e1bfbdbc0391c5e5d7908204f9064ec858c84d
From AOSP commit:
1ebca4b43115846af705bd320bccb8f930e328c8
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Elliott Hughes [Mon, 5 Dec 2016 21:29:49 +0000 (13:29 -0800)]
AOSP: Fix "Can't use getmntent or getmntinfo to check for mounted filesystems!" warning.
We do have <mntent.h> and setmntent(3).
Also silence unused parameter warnings; C programmers don't care, so
upstream is unlikely to fix that.
Bug: N/A
Test: builds
Change-Id: I57db0cca68a617913e21c2ef7b6613cd1183d7c5
From AOSP commit:
d5947f70714e6676bca2663af210bfb9f6118e83
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Adrien Schildknecht [Thu, 1 Dec 2016 23:05:06 +0000 (15:05 -0800)]
AOSP: 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
From AOSP commit:
c1b7d19958dc3dbe53810811ea3dcc4f04f85c73
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Adrien Schildknecht [Wed, 23 Nov 2016 08:46:47 +0000 (00:46 -0800)]
AOSP: android: add rules to build the static host libraries
Test: m libext2fs-host
Change-Id: I0f8155bc37516a59cf0ae1545ba37d52025f7a36
From AOSP commit:
ef511144c0104bcf2c730888bb39e1c4f95680d2
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Adrien Schildknecht [Wed, 30 Nov 2016 06:15:18 +0000 (22:15 -0800)]
AOSP: 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
From AOSP commit:
16babe7b79c4c9b6d75d60e30c04a8e24278e4fa
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Adrien Schildknecht [Wed, 30 Nov 2016 06:01:52 +0000 (22:01 -0800)]
AOSP: 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
From AOSP commit:
4c1e1f46301b3ff7f60be1d8e943ecc23b917ca7
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Adrien Schildknecht [Wed, 30 Nov 2016 05:45:03 +0000 (21:45 -0800)]
AOSP: 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
From AOSP commit:
0fe9949ca0cae4be6cde69e084db922506eda11a
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Adrien Schildknecht [Wed, 30 Nov 2016 05:36:43 +0000 (21:36 -0800)]
AOSP: 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
From AOSP commit:
fdc29bee07aef3a379f3ec3ccbaa551ff6500bff
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Adrien Schildknecht [Wed, 30 Nov 2016 05:20:29 +0000 (21:20 -0800)]
AOSP: 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
From AOSP commit:
6686ee96494413b48aa3dd70b5db533cbb7e4852
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Adrien Schildknecht [Wed, 23 Nov 2016 21:02:16 +0000 (13:02 -0800)]
AOSP: 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
From AOSP commit:
127a599529a0c31d8e3bc4da82a5debd670254b6
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Adrien Schildknecht [Fri, 11 Nov 2016 06:34:32 +0000 (22:34 -0800)]
AOSP: 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
From AOSP commit:
f9e0f1d4a7cf32c4091eee7d2a1676cac1d17438
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Colin Cross [Fri, 21 Oct 2016 23:41:10 +0000 (16:41 -0700)]
AOSP: 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
From AOSP commit:
bfa685deba9eb828b7ed35d6ccaf0345f6337ce3
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Fri, 19 May 2017 17:27:18 +0000 (13:27 -0400)]
Merge branch 'maint' into next
Mike Frysinger [Fri, 19 May 2017 17:25:59 +0000 (13:25 -0400)]
include sys/sysmacros.h as needed
The minor/major/makedev macros are not entirely standard. glibc has had
the definitions in sys/sysmacros.h since the start, and wants to move away
from always defining them implicitly via sys/types.h (as this pollutes the
namespace in violation of POSIX). Other C libraries have already dropped
them. Since the configure script already checks for this header, use that
to pull in the header in files that use these macros.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Eric Biggers [Mon, 8 May 2017 22:47:57 +0000 (15:47 -0700)]
misc: fix 'zero_hugefiles = false' regression
When mk_hugefiles() was switched to use ext2fs_fallocate(), it was
accidentally changed to ignore the 'zero_hugefiles = false' setting,
which should cause hugefiles to be allocated without initializing their
contents. Fix this by only passing EXT2_FALLOCATE_ZERO_BLOCKS to
ext2fs_fallocate() when zero_hugefiles is true.
Google-Bug-Id:
38037607
Fixes:
4f868703f6f2 ("libext2fs: use fallocate for creating journals and hugefiles")
Cc: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Tahsin Erdogan [Sat, 15 Apr 2017 06:24:36 +0000 (23:24 -0700)]
e2fsck: eliminate per-block cluster alignment check
scan_extent_node() did cluster alignment check for every block in an
extent. This is unnecessary and significantly slows down the runtime
when hugefile is used with bigalloc.
Do cluster alignment check once for each extent.
Google-Bug-Id:
36886699
Signed-off-by: Tahsin Erdogan <tahsin@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Wed, 26 Apr 2017 16:03:27 +0000 (12:03 -0400)]
Merge branch 'maint' into next
Theodore Ts'o [Wed, 26 Apr 2017 14:07:18 +0000 (10:07 -0400)]
tests: skip running long test with "make check" and add "make fullcheck"
Don't run tests which take longer than 20 seconds to run (especially
f_large_dir, whose run time is well over ten minutes) for "make
check". The new "make fullcheck" will run all of the regression tests
for e2fsprogs.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Wed, 26 Apr 2017 05:05:56 +0000 (01:05 -0400)]
tests: fix bash'isms in f_large_dir
Fix portability problems in the test script for f_large_dir. Also
clean up messages that the script prints while it runs (and
unfortunately it takes a very long time to run).
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Sat, 15 Apr 2017 14:33:53 +0000 (10:33 -0400)]
e2fsck: fix ASAN error when using 128 byte inodes
Due to the inode table buffering, it's actually hard to overrun the
end of allocated memory, so the ASAN error doesn't trigger all the
time.
Google-Bug-Id:
37326362
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Sat, 15 Apr 2017 13:22:27 +0000 (09:22 -0400)]
e2fsck: allow extent tree optimization to be disabled
Add an extended option, -E no_optimize_extents, as well as a
e2fsck.conf profile option, to disable extent tree optimization.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Sat, 15 Apr 2017 04:59:11 +0000 (00:59 -0400)]
tests: add new test f_quota_extent_opt
Add a test to validate the changes in commit
403bcb668e4f: "e2fsck:
update quota when optimizing the extent tree".
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Sat, 15 Apr 2017 04:29:46 +0000 (00:29 -0400)]
e2fsck: update quota when optimizing the extent tree
If quota is enabled, optimizing the extent tree wouldn't update the
in-memory quota statistics, so that a subsequent e2fsck run would show
that the quota usage statistics on disk were incorrect.
Google-Bug-Id:
36391645
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Fri, 14 Apr 2017 20:44:16 +0000 (16:44 -0400)]
e2fsck: fix type mismatch bug in the largedir patch
Commit
ae9efd05a986: "e2fsck: 3 level hash tree directory
optimization" introduced a bug when checking for the largedir feature.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Artem Blagodarenko [Wed, 15 Feb 2017 15:45:47 +0000 (18:45 +0300)]
tests: 3 level hash tree test
Test is added that recreate directory (-fD fsck option)
with 47.5k of 255-symbol name files. This amount of files
can not be stored only in 2 hevel htree, so 3 levels are used.
Signed-off-by: Artem Blagodarenko <artem.blagodarenko@seagate.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Artem Blagodarenko [Wed, 15 Feb 2017 17:45:00 +0000 (20:45 +0300)]
e2fsck: 3 level hash tree directory optimization
e2fsck fix for partitions with 3 level hash directries.
Additional level is added to e2fsck -D codepath.
Signed-off-by: Artem Blagodarenko <artem.blagodarenko@seagate.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Artem Blagodarenko [Wed, 15 Feb 2017 17:43:15 +0000 (20:43 +0300)]
e2fsprogs: add support for 3-level htree
The INCOMPAT_LARGEDIR feature allows larger directories to
be created, both with directory sizes over 2GB and and a
maximum htree depth of 3 instead of the current limit of 2.
These features are needed in order to exceed the currently
limit of approximately 10M entries in a single directory
for 4KB blocksize (~100k for 1KB).
debugfs, e2fsck, ext2fs, mke2fs and tune2fs support is
added.
Signed-off-by: Alexey Lyashkov <alexey.lyashkov@seagate.com>
Signed-off-by: Artem Blagodarenko <artem.blagodarenko@seagate.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Artem Blagodarenko [Mon, 13 Feb 2017 09:20:14 +0000 (12:20 +0300)]
e2fsprogs: supersede i_dir_acl with i_size_high for all cases
This patch removes i_dir_acl macros and macros users.
Now stucture field can be accessed as i_size_high. This field
is useful for largedir feature.
Signed-off-by: Alexey Lyashkov <alexey.lyashkov@seagate.com>
Signed-off-by: Artem Blagodarenko <artem.blagodarenko@seagate.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Joe Richey [Mon, 3 Apr 2017 16:52:50 +0000 (16:52 +0000)]
e4crypt: fix error handling for KEYCTL_GET_KEYRING_ID
Due to some interesting behaviour in keyctl (as described in the
comments), we use KEYCTL_GET_KEYRING_ID to translate the special value
of KEY_SPEC_SESSION_KEYRING to a real keyring id. However, how we
currently do this is flawed in two ways.
First, if KEYCTL_GET_KEYRING_ID fails, we don't detect it as it returns
-1 and zero is used for an error value in get_keyring_id. Second, if the
user specifies "-k @s" the translation never runs and the undesireable
behavior occurs.
These are both fixed by doing the translation outside of get_keyring_id.
Signed-off-by: Joe Richey <joerichey@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Eric Whitney [Sun, 2 Apr 2017 16:57:05 +0000 (12:57 -0400)]
e2fsck: fix quota accounting to use cluster units
The quota accounting code in e2fsck's pass 1 and pass 3 uses block units
rather than cluster units when recording the allocated space consumed by
files and directories. In pass 1, this causes a large undercount of
actual quota results and test failures for xfstests generic/383, /384,
/385, and /386 on bigalloc file systems. In pass 3, this results in
quota accounting errors when the lost+found directory is either extended
or recreated on a bigalloc file system.
Use clusters rather than blocks when accounting for allocated space,
and correct a related header comment in the quota code.
Note that pass 1b also contains call sites for quota_data_sub() that
also need to be addressed. However, it appears that more than just
unit conversion may be needed, so that will be left to a future patch.
Signed-off-by: Eric Whitney <enwlinux@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Eric Biggers [Fri, 17 Mar 2017 22:38:36 +0000 (15:38 -0700)]
libext2fs: apply LDFLAGS when building tst_inline_data
If libext2fs was compiled with an external libblkid pointed to by
LDFLAGS, then linking the tst_inline_data program failed because the
requested linker flags were not used. Fix this by adding $(ALL_LDFLAGS)
to the build rule, as is done for the other test programs.
Fixes:
31253488385a ("libext2fs: add a unit test for inline data")
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Eric Whitney [Fri, 31 Mar 2017 23:21:59 +0000 (19:21 -0400)]
e2fsck: fix type mismatches in quota warning message
The conversion operations in the format control strings found in the
fprintf call used to print the quota warning message do not match the
types of their corresponding arguments. Although this probably hasn't
generally been a problem, it obfuscates a bigalloc quota accounting bug
where the reported actual quota goes negative.
Clean up the mismatches and some unnecessary casts. While we're at it,
fix a spelling nit in a related comment.
Signed-off-by: Eric Whitney <enwlinux@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Justin Bronder [Fri, 31 Mar 2017 14:24:39 +0000 (10:24 -0400)]
Fix metadata_csum typo in ext4 man page
Signed-off-by: Justin Bronder <jsbronder@cold-front.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Darrick J. Wong [Thu, 2 Mar 2017 04:52:12 +0000 (20:52 -0800)]
misc: fix all the compiler warnings
Fix the various compiler warnings that have crept in, and only define
__bitwise if the system headers haven't already done so. Linux 4.10
changes the __bitwise definition so that our redefinition here is
just different enough that gcc complains.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Fri, 3 Mar 2017 15:00:17 +0000 (10:00 -0500)]
tests: fix test failure in f_detect_xfs caused by commit
bf615bb0ccad
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Alexey Lyashkov [Wed, 1 Mar 2017 20:03:54 +0000 (15:03 -0500)]
libext2fs: readahead for meta_bg
There are ~37k of random IOs with meta_bg option on 300T target.
Debugfs requires 20 minutes to be started. Enabling readahead for
group blocks metadata save time dramatically. Only 12s to start.
Signed-off-by: Alexey Lyashkov <alexey.lyashkov@seagate.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Theodore Ts'o [Wed, 1 Mar 2017 19:33:45 +0000 (14:33 -0500)]
e2fsck: report the exit value in the logfile
If e2fsck logging is enabled, report the exit value as the last line
in the log file.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Yuri Chornoivan [Mon, 20 Feb 2017 02:45:43 +0000 (21:45 -0500)]
po: update uk.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Göran Uddeborg [Mon, 20 Feb 2017 02:45:43 +0000 (21:45 -0500)]
po: update sv.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Jakub Bogusz [Mon, 20 Feb 2017 02:45:42 +0000 (21:45 -0500)]
po: update pl.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Benno Schulenberg [Mon, 20 Feb 2017 02:45:42 +0000 (21:45 -0500)]
po: update nl.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Samuel Thibault [Mon, 20 Feb 2017 02:45:42 +0000 (21:45 -0500)]
po: update fr.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Antonio Ceballos [Mon, 20 Feb 2017 02:45:42 +0000 (21:45 -0500)]
po: update es.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Joe Hansen [Mon, 20 Feb 2017 02:45:42 +0000 (21:45 -0500)]
po: update da.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Petr Pisar [Mon, 20 Feb 2017 02:45:42 +0000 (21:45 -0500)]
po: update cs.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Mon, 20 Feb 2017 02:08:21 +0000 (21:08 -0500)]
debugfs: better support of superblocks with bad checksums
Allow debugfs to open file systems with a bad checksum, and teach the
show_super_stats command to print the expected checksum value.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Fri, 17 Feb 2017 20:18:10 +0000 (15:18 -0500)]
Do interim update of RELEASE NOTES
Andreas Dilger [Fri, 17 Feb 2017 17:57:29 +0000 (12:57 -0500)]
e2fsck: make problem comments match error messages
Since the @x compression obscures e2fsck problem error messages
from being found by normal searching, make the comment for each
error match the actual error message so that they can be found
more easily.
Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Fri, 17 Feb 2017 15:42:17 +0000 (10:42 -0500)]
e2fsck: don't check inode flag values for deleted inodes
Commit
47b8941774df "e2fsck: make sure system.data xattr is present"
exposed a bug in e2fsck's pass 1 handling which caused the xfstests's
generic/079 to fail if the inline_data feature was enabled. The
problem was that e2fsck was checking if an inode with inline data had
the system.xattr EA before checking to see if that inode was still in
use --- and this invariant isn't necessarily true for deleted inodes.
There were a number of other checks that were done too early that
could also potentially cause false positive complaints, although those
would normally only happen if a now-unused portion of the inode table
had gotten corrupted, or if tune2fs had disabled a particular file
system feature and there old, deleted inodes that had values
inconsistent with the new file system configuration.
Reported-by: Eric Whitney <enwlinux@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Fri, 17 Feb 2017 03:02:35 +0000 (22:02 -0500)]
e2fsck: exit with exit status 0 if no errors were fixed
Previously, e2fsck would exit with a status code of 1 even though the
only changes that it made to the file system were various
optimziations and not fixing file system corruption. Since the man
page states that an exit status of 1 means "file system errors
corrupted", fix e2fsck to return an exit status of 0.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Thu, 16 Feb 2017 23:54:41 +0000 (18:54 -0500)]
Refactor code to print journal superblock information
Move the code to list the journal superblock information to libe2p, so
it can be used by debugfs, and so we don't have two copies of
substantially the same code in dumpe2fs.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Thu, 16 Feb 2017 20:11:23 +0000 (15:11 -0500)]
libext2fs: remove unused jfs_dat.h file
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Eric Biggers [Mon, 13 Feb 2017 00:01:40 +0000 (16:01 -0800)]
debugfs: with ls -l, include space between size and date
Before:
11 40700 (2) 0 0 1228812-Feb-2017 12:51 lost+found
After:
11 40700 (2) 0 0 12288 12-Feb-2017 12:51 lost+found
Fixes:
68a1de3df340 ("debugfs: pretty print encrypted filenames in the ls command")
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Eric Biggers [Mon, 13 Feb 2017 00:00:09 +0000 (16:00 -0800)]
debugfs.8: fix name of argument to blocks command
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Thu, 16 Feb 2017 16:19:51 +0000 (11:19 -0500)]
libsupport: remove debugging printf() from parse_qtype.c
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Thu, 16 Feb 2017 16:15:34 +0000 (11:15 -0500)]
tests: don't use "debugfs -f /dev/stdin"
Don't use "debugfs -f /dev/stdin" for portability reasons --- not all
systems have /dev/stdin. Simply dropping "-f /dev/stdin" works just
fine.
Reported-by: Rical Jasan <ricaljasan@pacific.net>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
John Haxby [Wed, 8 Feb 2017 15:26:38 +0000 (15:26 +0000)]
mke2fs: remove the -f option from the man page
The -f option was removed in
c6ed60cdeb13 (mke2fs: support creating
bigalloc file systems), let's remove it from the man page as well.
And as it was the only noted bug, take the BUGS section with it.
Signed-off-by: John Haxby <john.haxby@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Mon, 6 Feb 2017 01:59:37 +0000 (20:59 -0500)]
debian: update changelog for tune2fs regression fix
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Eric Whitney [Sat, 4 Feb 2017 03:23:34 +0000 (22:23 -0500)]
tune2fs: fix quota enablement regression
Commit
5c2a665afa (Avoid dereferencing beyond allocated memory in quota
handling) induced a quota enablement regression in tune2fs. Attempts
to enable a particular quota type (tune2fs -O project <dev>, for
example) set the appropriate feature flag in the superblock but the
quota file for the type is not initialized.
The regression prevents the current version of xfstests from running
generic/383, 384, 385, and 386 (all project quota tests) with e2fsprogs
1.43.4. These tests exit with the message "Installed kernel does not
support project quotas", but the actual problem is that the project
quota file is not present.
Signed-off-by: Eric Whitney <enwlinux@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Wed, 1 Feb 2017 00:57:28 +0000 (19:57 -0500)]
Update debian changelog for 1.43.4-2
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Tue, 31 Jan 2017 23:24:50 +0000 (18:24 -0500)]
Update release notes, etc., for the 1.43.4 release
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Tue, 31 Jan 2017 22:49:35 +0000 (17:49 -0500)]
Add the Malay translation from the Translation Project
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Tue, 31 Jan 2017 22:47:06 +0000 (17:47 -0500)]
Add Finnish translation from the Translation Project
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Mingye Wang (Arthur2e5) [Tue, 31 Jan 2017 22:34:56 +0000 (17:34 -0500)]
po: update zh_CN.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Мирослав Николић [Tue, 31 Jan 2017 22:34:56 +0000 (17:34 -0500)]
po: update sr.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Antonio Ceballos [Tue, 31 Jan 2017 22:34:55 +0000 (17:34 -0500)]
po: update es.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Philipp Thomas [Tue, 31 Jan 2017 22:34:55 +0000 (17:34 -0500)]
po: update de.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Petr Pisar [Tue, 31 Jan 2017 22:34:55 +0000 (17:34 -0500)]
po: update cs.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Tue, 31 Jan 2017 22:08:34 +0000 (17:08 -0500)]
Stop installing mkfs.ext4dev and fsck.ext4dev
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Tue, 31 Jan 2017 21:22:06 +0000 (16:22 -0500)]
e2label.8, tune2fs.8: use volume label terminology consistently
Addresses-Debian-Bug: #852726
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Tue, 31 Jan 2017 21:17:15 +0000 (16:17 -0500)]
tune2fs, mke2fs: use "Proceed (y, N)" so the default is clear
Addresses-Debian-Bug: #852727
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Tue, 31 Jan 2017 21:16:40 +0000 (16:16 -0500)]
fuse2fs: fix Coverity warnings
(including some potential memory leaks on error paths)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Tue, 31 Jan 2017 20:31:13 +0000 (15:31 -0500)]
debugfs: in ea_get -V, don't print double quotes around the C strings
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Tue, 31 Jan 2017 20:30:28 +0000 (15:30 -0500)]
libsupport: improve how invalid hex strings are parsed as C strings
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Tue, 31 Jan 2017 20:29:57 +0000 (15:29 -0500)]
libext2fs: fix memory leaks in ext2fs_xattr_set()
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Tue, 31 Jan 2017 19:05:45 +0000 (14:05 -0500)]
e2fsck: make sure system.data xattr is present
E2fsprogs used to assume that if i_size is less than 60 bytes, the
system.data xattr isn't needed (and should be removed). The kernel
disagree, and will declare the file system to be corrupted. Enforce
the tighter constraints assumed by the kernel.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Tue, 31 Jan 2017 06:03:13 +0000 (01:03 -0500)]
Update release notes, etc. for 1.43.4-WIP release
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Tue, 31 Jan 2017 06:02:03 +0000 (01:02 -0500)]
Add utility script which generates a small sample file system
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Artem Blagodarenko [Tue, 31 Jan 2017 02:51:14 +0000 (21:51 -0500)]
During filesystem creation with -d option files copied from given
directory. If supported, FS_IOC_FIEMAP ioctl is used to get file
extents. For empty file fm_mapped_extents is 0 and no error code
is returned, because this is not fail situation.
Without this patch errno from previous operation is returned and
successful FS_IOC_FIEMAP ioctl call for empty file is interpreted
as error.
Signed-off-by: Artem Blagodarenko <artem.blagodarenko@seagate.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Eric Whitney [Mon, 30 Jan 2017 17:34:16 +0000 (12:34 -0500)]
e2fsprogs: enable project quota reporting in debugfs
Make the minor changes required so the list_quota and get_quota commands
can report project quota information. This also fixes a debugfs
segfault that currently occurs when either list_quota or get_quota is
invoked with an unknown quota_type argument.
Signed-off-by: Eric Whitney <enwlinux@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Sun, 29 Jan 2017 03:34:16 +0000 (22:34 -0500)]
libext2fs: translate internal ext4 acl to Posix ACL in ext2fs_xattr_[sg]et()
ext2fs_xattr_[sg]et() will now translate the Posix ACL xattrs to and
from the internal ext4 attr format, since the callers of the libext2fs
are much more likely to want to use the public Posix ACL format.
For debugfs and those applications that want to see the on-disk
format, the new ext4fs_xattr_flags() function will allow those callers
to request the raw format.
Addresses-Launchpad-Bug: #1645232
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Sat, 28 Jan 2017 18:09:53 +0000 (13:09 -0500)]
debugfs: improve how we display and parse extended attribute values
Use the new C string printing routine, and allow ea_get command to
display the system.data extended attribute. Also allow the user to
explicitly request that the string be printed using hex values.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Sat, 28 Jan 2017 17:11:46 +0000 (12:11 -0500)]
libsupport: add C string printing and parsing functions
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Dmitry Monakhov [Wed, 7 Dec 2016 14:55:17 +0000 (18:55 +0400)]
test: add f_mke2fs_baddisk
Check what mke2fs will return non zero error on broken device.
This test requires using dmsetup, so it requires running as root; if
root privileges is not available, the test will be skipped.
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Eric Sandeen [Tue, 20 Dec 2016 15:23:29 +0000 (09:23 -0600)]
libext2fs: don't ignore fsync errors
Today, if mke2fs experiences IO errors (say, on a thin device
which filled up during mkfs), mke2fs is silent and returns
success even though the filesystem was not properly created.
Catch errors from the io_channel_flush() callchain to
fix this up. Fix formatting of the printed error as
well:
...
Creating journal (262144 blocks): done
Writing superblocks and filesystem accounting information:
Warning, had trouble writing out superblocks.
# echo $?
5
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Fri, 23 Dec 2016 03:23:58 +0000 (22:23 -0500)]
lib/et/testcases: checked in imap_err.et from cyrus-imapd version 2.5.10
This version of imap_err.et has a 4-clause BSD license, which should
hopefully be more comforting to lawyers than the license with
prohibits non-commercial use --- which shouldn't be a problem since
it's in a test case that would never show up in any binary, and so
license compatibility wouldn't be an issue.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Jeff Sharkey [Fri, 21 Oct 2016 18:44:14 +0000 (12:44 -0600)]
Bring back libext2_profile build rules.
Google-Bug-Id:
27599744
From AOSP commit:
80fcd5bb6dcc130337def60423a5d9e22a5814e7
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Sat, 12 Nov 2016 14:31:56 +0000 (09:31 -0500)]
debugfs, e2fsck, mke2fs: fix miscellaneous memory leaks detected by ASAN
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Sat, 12 Nov 2016 04:15:56 +0000 (23:15 -0500)]
Make sure test progams free all allocated memory
This eliminates complaints from ASAN's memory leak detector.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Fri, 11 Nov 2016 23:39:26 +0000 (18:39 -0500)]
Avoid dereferencing beyond allocated memory in quota handling
The quota support code must must not try to handle the project quota
if the the project feature is not enabled.
Problem detected by ASAN.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Fri, 11 Nov 2016 23:38:20 +0000 (18:38 -0500)]
libext2fs: avoid dereferencing beyond allocated memory in xattr code
Detected by ASAN.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Fri, 11 Nov 2016 23:34:35 +0000 (18:34 -0500)]
e2fsck: avoid dereferencing beyond allocated memory with 128 byte inodes
Detected by ASAN when the inode size is 128 bytes.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Jan Kara [Tue, 25 Oct 2016 18:08:59 +0000 (14:08 -0400)]
mke2fs: Avoid crashes / infinite loops for absurdly large devices
When a device reports absurdly high size, some arithmetics in mke2fs can
overflow (e.g. number of block descriptors) and we end in an infinite
loop. Fix that by checking and refusing insanely large devices.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Darrick J. Wong [Tue, 25 Oct 2016 17:28:13 +0000 (13:28 -0400)]
partinfo: fix some build errors
Fix some missing header files and library link targets.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Thomas De Schampheleire [Tue, 25 Oct 2016 17:22:39 +0000 (13:22 -0400)]
libsupport: fix compilation on RHEL 5.x due to missing magic define
RHEL 5.x does have magic.h, but it does not define all expected symbols. In
particular, the NO_CHECK symbols were only added in file 4.20 and RHEL 5.x
is using 4.17.
Add substitute defines to allow continued usage of magic but without the
requested exclude checks.
Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Tue, 25 Oct 2016 17:18:14 +0000 (13:18 -0400)]
resize2fs: fix resizing large file systems when block size != page size
Reported by: Jerry Lee <jerrylee@qnap.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Mon, 24 Oct 2016 19:18:09 +0000 (15:18 -0400)]
android: fix Mac build
Disable building debugfs and e4crypt on mac.
Add missing time.h include in ext2fs.h for time_t.
From AOSP commit:
f2b2d2c0a6af8bd1e1a19150cf9d41d8f2b0e39a
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Mon, 24 Oct 2016 18:15:43 +0000 (14:15 -0400)]
mke2fs.conf: add back missing uninit_bg feature flag
Commit
0da058af9f88: "mke2fs.conf: don't enable metadata_csum by
default" removed metadata_csum without adding back the uninit_bg flag
--- which had the net result of causing file systems to take a long
time to mke2fs, since this caused all of the block group metadata to
be initialized.
Addresses-Google-Bug:
32342524
Signed-off-by: Theodore Ts'o <tytso@mit.edu>