Commit Graph

5256 Commits (8f8511aba07c47df779be94eeb5970f2b73000d8)

Author SHA1 Message Date
Theodore Ts'o 8f8511aba0 libext2fs: fix gcc -Wall nits
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-06-21 20:15:52 -04:00
Theodore Ts'o 9603da15cb Revert "debugfs: add the hexdump_block command"
This reverts commit 58b0356a25.

We already have the block_dump (bd) command, but I had completely
forgotten about it.  Oops!

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-06-21 20:14:32 -04:00
Theodore Ts'o 6ece39e173 update config.{guess,sub,rpath} from FSF and gettext
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-06-20 22:10:10 -04:00
Theodore Ts'o 0fe40211b4 Merge branch 'maint' into next 2015-06-20 22:01:26 -04:00
Phillip Susi 8815116d1d tune2fs.8: update maximum journal size
The man page for tune2fs still listed the upper limit for the journal
as 102,400 blocks.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-06-20 15:43:39 -04:00
Theodore Ts'o 5ea7aee425 rename configure.in to configure.ac
Some newer versions of autoconf kvetch if we are still using
configure.in.  As of this writing the only version of autoconf which I
support is autoconf 2.69, and if you try to recreate the configure
script which is shipped with e2fsprogs, and it breaks, you get to keep
both pieces.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-06-20 14:33:24 -04:00
Theodore Ts'o f5dffb8132 configure: use system libraries for blkid and uuid if present
The configure script will now determine if the blkid and uuid
libraries are present (requires that pkg-config and their .pc files
are available).

In addition, enable quota support by default.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-06-20 14:20:14 -04:00
Theodore Ts'o 58b0356a25 debugfs: add the hexdump_block command
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-06-20 00:10:20 -04:00
Theodore Ts'o 83c799dea0 Merge branch 'maint' into next 2015-06-19 22:01:16 -04:00
Konstantin Khlebnikov f7e37e8b95 debugfs: fix several errors and add assertions in the set_fields command
Fix copy-n-paste errors:
* remove duplicate "lastcheck" and "min_extra_isize"
* fix pointer for "first_error_line" and "last_error_line"
* remove superblock field "inodes_count" from inode fields
* add null-termination for mmp_fields

Add assertions for catching such errors in the future.
Mark true aliases with flag "FLAG_ALIAS" and suppress assert for them.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-06-19 21:54:09 -04:00
Andreas Dilger a6eeac1ceb mke2fs: prompt for user verification for "-S"
Prompt for user verification before rewriting the filesystem
superblocks using the "-S" (super-only) option.  This should
not normally be used at all, so adding the extra verification
will probably save a few user filesystems in the future.  Since
this is something that should only be done in rare cases under
user supervision, wait for user input rather than proceeding
automatically after a timeout.

Update the mke2fs man page to more fully explain the many
dangers of this option.

Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-06-19 21:34:02 -04:00
Andreas Dilger 59707c1b58 misc: fix alignment warnings on ARM
Some temporary char buffers allocated on the stack are not properly
aligned when typecast to a structure containing __u32 or __u64 types,
and this can cause alignment warnings on ARM and other alignment
sensitive architectures, and potential slowdowns to do fixups.

Fix the buffer alignment to avoid such issues.

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=680090

Reported-by: Gordan Bobic <gordan.bobic@gmail.com>
Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-06-19 21:33:19 -04:00
Andreas Dilger 23cb84c547 tests: skip large filesystem tests on MacOS
Skip tests that create large filesystem on MacOS, since HFS doesn't
have sparse file support and this causes testing to be uninterruptible
for minutes while mke2fs is writing to some large non-zero offset and
filling up the test filesystem.  Since most testing is done on Linux
this shouldn't cause a significant gap in testing coverage.

Tests skipped are d_dumpe2fs_group_only, m_bigjournal, m_hugefile,
t_iexpand_full, t_iexpand_mcsum, and t_uninit_bg_rm.

Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-06-19 21:31:26 -04:00
Theodore Ts'o 74f2c4aa18 fix diet libc build breaks for e4crypt and fallocate
Diet libc doesn't support syscall correctly, but it does have
add_key() and keyctl() in libc (although glibc does not).  So change
e4crypt to use add_key() and keyctl() directly if they are available.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-06-19 19:28:25 -04:00
Theodore Ts'o 6f5bb811e8 e2fsck: skip checking the journal fields if the file system is mounted
When a file system with journal checksums is mounted, the journal
checksum is only updated when the journal superblock is actually
written to disk.  But when a root file system is mounted read-only,
e2fsck will get the in-memory version of the journal superblock, and
the checksum is not necessarily going to be correct.  Since we only
allow the root file system to be checked while it is mounted
read-only, and we won't be trying to replay the journal anyway.  So we
can skip the checking the journal superblock fields for mounted file
systems.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-06-19 18:14:33 -04:00
Theodore Ts'o dc810decfa Merge branch 'maint' into next 2015-06-15 23:16:24 -04:00
Theodore Ts'o 823c245e0d misc: fix bugs which broke misc/Makefile.in's "make depend"
This resulted in the build failing when building e2fsprogs from
scratch.

Reported-by: "Darrick J. Wong" <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-06-15 15:22:01 -04:00
Richard Yao 97e9b97076 misc: remove broken whole device check
Modern Linux major/minor numbering on block devices no longer conform to
the divisible by 64 rule for minor numbering. On my development system,
the correct number is 16. Consequently, this applies only to every 4th
drive on a modern system, which is inconsistent. That caused the
following bug to be filed against Flocker:

https://clusterhq.atlassian.net/browse/FLOC-2041

We could unconditionally pass -F to override this check whenever it
triggers, but that it would also override the libblkid check that
determines whether there are existing partitions, logical volumes or
filesystems on the disk, which seems unwise.

I propose that this check be removed because passing a whole disk to
mke2fs is a valid use case and given how long this has been broken,
users are already accustomed to the behavior where -F is not necessary
to format a whole disk as ext4.

Signed-off-by: Richard Yao <ryao@gentoo.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
2015-06-14 14:50:58 -04:00
Theodore Ts'o 58354a38e2 e4crypt: fix hexidecimal salt parsing
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-06-10 22:52:48 -04:00
Darrick J. Wong eeb2bb68f8 libext2fs: remove unnecessary undo file flush calls
Remove all flushes of the undo file except for the one that happens just
prior to the file being closed; it seems that the arbitrary flushes
aren't sufficiently useful.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-06-10 20:08:33 -04:00
Darrick J. Wong 81cbf1ef4f misc: add fuse2fs, a FUSE server for e2fsprogs
This is the initial implementation of a FUSE server based on
e2fsprogs.  The point of this program is to enable ext4 to run on any
OS that FUSE supports (and doesn't already have a native driver), such
as MacOS X, BSDs, and Windows.  The code requires FUSE API v28, which
is available in Linux fuse and osxfuse releases that are available as
of August 2013.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-06-10 20:07:48 -04:00
Darrick J. Wong 117f9d03a6 tests: test debugfs punch command
Test punching out various parts of sparse files.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-06-10 20:02:39 -04:00
Darrick J. Wong 2f8c0d028c debugfs: implement fallocate
Implement a fallocate function for debugfs, and add some tests to
demonstrate that it works (more or less).

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-06-10 20:01:24 -04:00
Darrick J. Wong 4f868703f6 libext2fs: use fallocate for creating journals and hugefiles
Use the new fallocate API for creating the journal and the mk_hugefile
feature.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-06-10 19:57:52 -04:00
Darrick J. Wong 5aad5b8e0e libext2fs: implement fallocate
Create a library function to perform fallocation on arbitrary files.
This is a bit more intense than Ted's original mk_hugefiles
implementation since we have to honor any blocks that may already be
allocated to the file.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-06-10 19:56:46 -04:00
Darrick J. Wong 647e878615 libext2fs: add new hooks to support large allocations
Add a new get_alloc_blocks hook and a block_alloc_stats_range hook so
that e2fsck can capture allocation requests spanning more than a
block to its block_found_map.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-06-10 14:13:25 -04:00
Theodore Ts'o a693a82dfa Add fsstress to contrib so it can be built for use in Android
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-05-25 22:27:47 -04:00
Theodore Ts'o beb19fce8a Allow debugfs to be built for use in Android
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-05-25 22:26:20 -04:00
Theodore Ts'o 766c142891 libext2fs: fix ext2fs_close() when MMP is not enabled
If MMP support is not configured, then ext2fs_mmp_stop() will always
return the error EXT2_ET_OP_NOT_SUPPORTED.  Unfortunately,
ext2fs_close() and tune2fs call ext2fs_mmp_stop() unconditionally.  So
if the file system does not have MMP enabled, fix ext2fs_mmp_stop() to
return success even if CONFIG_MMP is not enabled, so that
ext2fs_close() and tune2fs doesn't fail for no good reason.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-05-25 22:18:43 -04:00
Theodore Ts'o 81f95d43d5 libext2fs, libe2p, misc: git rid of jfs_user.h
Having multiple versions of jfs_user.h was confusing the Android
build.  Clean up things by removing the lib/ext2fs/jfs_user.h and
misc/jfs_user.h and simplifying how we emulate the kernel
infrastructure needed by journal replay code and removing the
kernel-specific lines from kernel-jbd.h.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-05-25 21:18:15 -04:00
Theodore Ts'o 2df733facd Update Android build files so the 1.43 branch builds on AOSP
Recent changes in the 1.43 branch as well as the latest AOSP caused
the Android build to break; fix them.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-05-25 20:25:28 -04:00
Eric Sandeen 7cb2ed25b1 e2fsprogs: use $DUMPE2FS in resize_test script
Use $DUMPE2FS in resize tests to be sure it's testing
the in-tree dumpe2fs, not the system dumpe2fs (which may
not even be there...)

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-05-23 18:39:04 -04:00
Theodore Ts'o 8beba812a9 e2fsck,misc: include ext2fs.h to avoid clang warnings
e2fsck/dirinfo.c and misc/e4crypt.c use functions from libext2fs, so
we need to include its header file or clang will complain.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-05-23 18:08:35 -04:00
Theodore Ts'o 1123a2ecd0 debian: update e2fslibs.symbols for 1.43-WIP release
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-05-18 10:41:27 -04:00
Theodore Ts'o ff75327448 Merge branch 'maint' into next 2015-05-18 02:15:56 -04:00
Theodore Ts'o 94df6e9e0d debian: remove trailing spaces from control.in file
This were causing lintian failures.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-05-18 02:14:55 -04:00
Theodore Ts'o 99336932d6 Update release notes for a 1.43-WIP release (18-May-2015)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-05-18 01:57:30 -04:00
Theodore Ts'o cd27af3ecb mke2fs: enable the metadata_csum and 64bit features by default
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-05-18 01:49:00 -04:00
Theodore Ts'o c97055e5e2 Merge branch 'maint' into next 2015-05-17 21:58:28 -04:00
Theodore Ts'o e622f9a14e Update release notes, etc. for final 1.42.13 release
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-05-17 21:33:25 -04:00
Theodore Ts'o c8c167d366 Merge remote-tracking branch 'origin/maint' into maint 2015-05-17 21:25:45 -04:00
Theodore Ts'o bd38698b06 Update translation template file
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-05-17 20:34:58 -04:00
Theodore Ts'o c5c3936c4a Add the Danish translation file from the Translation Project
The Danish translation is now up to 829/1317 messages, which is much
better than it had been before, and better than some of the current
translations which we are including in the e2fsprogs distribution.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-05-17 20:27:50 -04:00
Antonio Ceballos b771c83ad9 po: update es.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-05-17 20:21:40 -04:00
Benno Schulenberg 789fba3193 po: update eo.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-05-17 20:21:39 -04:00
Philipp Thomas 37be382bee po: update de.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-05-17 20:21:39 -04:00
Àngel Mompó d31b804117 po: update ca.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-05-17 20:21:39 -04:00
Theodore Ts'o 344c043b38 create_inode: handle source symlinks with extended attributes
We need to use lgetxattr(2) instead of getxattr(2) or attempts to
create file systems with extended attributes will fail:

set_inode_xattr: No data available while reading attribute "trusted.link" of "link"
__populate_fs: No data available while setting xattrs for "link"
mke2fs: No data available while populating file system

Reported-by: Jack_Fewx@Dell.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-05-17 15:06:45 -04:00
Theodore Ts'o 66eb45b965 tests: clean up the script for m_hugefile_slack
This test doesn't require resize2fs or debugfs, so remove those
checks.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-05-17 00:19:29 -04:00
Theodore Ts'o 10b17bb582 tests: test creating a single huge file using mke2fs -T hugefile
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-05-17 00:14:51 -04:00