Whamcloud - gitweb
tools/e2fsprogs.git
8 years agodebugfs: fix "set_bg <bg num> checksum calc" on 64-bit file systems
Theodore Ts'o [Wed, 25 May 2016 04:24:25 +0000 (00:24 -0400)]
debugfs: fix "set_bg <bg num> checksum calc" on 64-bit file systems

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agoe2fsck: improve error messages when the journal sb is corrupt
Theodore Ts'o [Wed, 25 May 2016 03:11:32 +0000 (23:11 -0400)]
e2fsck: improve error messages when the journal sb is corrupt

If the journal superblock is corrupt and the user declines to fix it
(or runs e2fsck -n), make sure the error messages are clear and
explain that e2fsck cannot (safely) proceed.

Addresses-Debian-Bug: #768162

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agodebian: use e2fsck.static from BUILD-STD
Theodore Ts'o [Wed, 25 May 2016 02:21:49 +0000 (22:21 -0400)]
debian: use e2fsck.static from BUILD-STD

Now that we are no longer trying to use dietlibc, there's no point
creating a separate build tree for e2fsck.static.  So just use
e2fsck.static from the standard build tree.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agodebian: simplify rules file
Theodore Ts'o [Tue, 24 May 2016 20:48:25 +0000 (16:48 -0400)]
debian: simplify rules file

Modern versions of debhelper understand how to build udeb, so we can
remove a lot of special case rules in the debain/rules file.  Also use
dh_lintian instead of open-coding the rules to copy in the Lintian
overrides files.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agodebian: package fuse2fs in its own separate package
Theodore Ts'o [Tue, 24 May 2016 19:38:01 +0000 (15:38 -0400)]
debian: package fuse2fs in its own separate package

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agodebian: update changelog with changes made to date
Theodore Ts'o [Mon, 23 May 2016 00:57:32 +0000 (20:57 -0400)]
debian: update changelog with changes made to date

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agodebian: loosen up dependency on debhelper
Theodore Ts'o [Sun, 22 May 2016 07:20:25 +0000 (03:20 -0400)]
debian: loosen up dependency on debhelper

In order to allow this package to be built on jessie, just depend on
debhelper >= 9.0.  We will test to see if dh_update_autotools_config
exists and only use it if it is present.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agodebian: build with hardening set to "all"
Theodore Ts'o [Sun, 22 May 2016 07:19:30 +0000 (03:19 -0400)]
debian: build with hardening set to "all"

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agoAdd --enable-hardening which builds e2fsprogs with security hardening
Theodore Ts'o [Sun, 22 May 2016 03:51:19 +0000 (23:51 -0400)]
Add --enable-hardening which builds e2fsprogs with security hardening

Enable the following security features: stack protection, fortify,
read-only relocation tables, immediate dynamic symbol binding, and
text segment ASLR by enabling position independent executable
(PIE).

Special handling is provided for shared library and statically linked
executables.  For all the gory details please see:

   https://lists.debian.org/debian-devel/2016/05/msg00302.html

Distributions who want to do their own special thing can set CFLAGS,
CFLAGS_SHLIB, CLFAGS_STLIB, LDFLAGS, LDFLAGS_SHLIB and LDFLAGS_STATIC
as appropriate.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agoe2fsck: fix project quota support
Theodore Ts'o [Sun, 22 May 2016 02:10:39 +0000 (22:10 -0400)]
e2fsck: fix project quota support

Use a large_inode so that when e2fsck is fixing a file system with
project quota enabled, the correct project id's quota is adjusted when
a corrupted inode is deleted.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agomke2fs: fix project quota creation
Theodore Ts'o [Sun, 22 May 2016 00:31:59 +0000 (20:31 -0400)]
mke2fs: fix project quota creation

Creating a file system with project quotas can fail if mke2fs is built
using hardening options.  This is because quota_compute_usage() used
ext2fs_get_next_inode() instead of ext2fs_get_inode_full(), and a
small inode was passed into quota_data_add, when a large inode needs
to be used.  As a result get_dq() would end up dereferencing undefined
space in the stack.  Without the hardening options, this would be
zero, so "mke2fs -t ext4 -O project.quota -I 256 test.img" would work
essentially by accident.

Fix this by using ext2fs_get_inode_full() so that a large inode is
available to quota_data_inodes().

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agodebian: Use Package-Type instead of XC-Package-Type
Theodore Ts'o [Sat, 21 May 2016 18:13:34 +0000 (14:13 -0400)]
debian: Use Package-Type instead of XC-Package-Type

XC-Package-Type was deprecated and replaced with Package-Type starting
in dpkg-dev 1.15.7.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agoe2fsck: use com_err error codes instead of EBADMSG and EUCLEAN
Theodore Ts'o [Sat, 21 May 2016 17:43:09 +0000 (13:43 -0400)]
e2fsck: use com_err error codes instead of EBADMSG and EUCLEAN

Some operating systems may not define EBADMSG and EUCLEAN, so for
better portability use our own private error code numbers.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agoClean up spelling errors and other nits in man pages
Theodore Ts'o [Sat, 21 May 2016 17:40:49 +0000 (13:40 -0400)]
Clean up spelling errors and other nits in man pages

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agodebian: fix spelling mistakes in copyright files
Theodore Ts'o [Sat, 21 May 2016 16:43:37 +0000 (12:43 -0400)]
debian: fix spelling mistakes in copyright files

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agodebian: fix packaging nits
Theodore Ts'o [Sat, 21 May 2016 14:54:36 +0000 (10:54 -0400)]
debian: fix packaging nits

Fix bad date in debian/changelog, as well as a dropped entry for
1.43~WIP.2016.03.15-2.

Tighted dependency version for debhelper to reflect use of
dh_update_autotools_config.

Removed unused source Lintian overrides.

Thanks to Mattia Rizzolo for pointing these out.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agodebian: remove unused and deprecated substitution variables
Theodore Ts'o [Sat, 21 May 2016 04:15:46 +0000 (00:15 -0400)]
debian: remove unused and deprecated substitution variables

Replace "Source-Version" with "binary:Version" in
e2fsprogs.shlibs.local, and e2fsck-static doesn't have any shared
libraries dependency so remove the ${shlibs:Depends} from the Depends.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agodebian: backup/restore the po files which get modified during the build
Theodore Ts'o [Sat, 21 May 2016 03:43:29 +0000 (23:43 -0400)]
debian: backup/restore the po files which get modified during the build

Before running "make update-gmo", backup the po/*.gmo and po/*.po
files so they can be restored when "make -f debian/rules clean" is
run.  This allows the Debian source tree to built and rebuilt.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agotests: fix filter.sed to filter out version numbers of the form 1.43
Theodore Ts'o [Sat, 21 May 2016 01:02:09 +0000 (21:02 -0400)]
tests: fix filter.sed to filter out version numbers of the form 1.43

The regular expression worked for version numbers such as 1.42.12, but
not if there isn't a third component in the version number.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agodebian: update changelog for 1.43-2
Theodore Ts'o [Fri, 20 May 2016 18:19:15 +0000 (14:19 -0400)]
debian: update changelog for 1.43-2

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agodebian: create dbgsym packages if debhelper supports them
Theodore Ts'o [Fri, 20 May 2016 17:37:58 +0000 (13:37 -0400)]
debian: create dbgsym packages if debhelper supports them

Starting with Debian Stretch, we now have support for dbgsym packages
which are uploaded to a separate package archive.  Since some people
might want to try to backport e2fsprogs 1.43 for Jessie set things up
so that the package can be built on older Debiain systems (where the
legacy dbg packages will be created) as well as newer (as of this
writing, Debian Sid or Stretch).

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agodebian: only try to execute update-initramfs if it exists
Theodore Ts'o [Fri, 20 May 2016 17:37:20 +0000 (13:37 -0400)]
debian: only try to execute update-initramfs if it exists

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agodebian: use dh_update_autotools_config to update config.{guess,sub}
Theodore Ts'o [Thu, 19 May 2016 23:13:16 +0000 (19:13 -0400)]
debian: use dh_update_autotools_config to update config.{guess,sub}

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agodebian: update watch file to check the GPG signed tar files
Theodore Ts'o [Thu, 19 May 2016 22:24:29 +0000 (18:24 -0400)]
debian: update watch file to check the GPG signed tar files

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agoUpdate release notes for a 1.43 (17-Mar-2016) v1.43
Theodore Ts'o [Tue, 17 May 2016 05:14:25 +0000 (01:14 -0400)]
Update release notes for a 1.43 (17-Mar-2016)

8 years agomke2fs.conf: don't enable metadata_csum by default
Theodore Ts'o [Tue, 17 May 2016 05:30:42 +0000 (01:30 -0400)]
mke2fs.conf: don't enable metadata_csum by default

For the 1.43 release, we will not be enabling the metadata_csum
feature by default.  We will leave that up to distribution vendors to
decide whether they want to be aggressive about enabling this feature
by default.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agotests: rename t_mke2fs_errors and t_mke2fs_offset
Theodore Ts'o [Tue, 17 May 2016 04:58:34 +0000 (00:58 -0400)]
tests: rename t_mke2fs_errors and t_mke2fs_offset

The 't' prefix is for tune2fs tests.  The 'm' prefix is for mke2fs
tests.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agomisc: fix various Coverity warnings
Theodore Ts'o [Tue, 17 May 2016 04:53:47 +0000 (00:53 -0400)]
misc: fix various Coverity warnings

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agoe2undo: support the undo header's fs_offset feature
Marcus Huewe [Thu, 12 May 2016 19:36:39 +0000 (15:36 -0400)]
e2undo: support the undo header's fs_offset feature

If the fs_offset feature is present (and no "-o offset"
option is specified), e2undo performs the undo operation at
the stored offset.

Signed-off-by: Marcus Huewe <suse-tux@gmx.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agolibext2fs: add fs_offset entry to the undo header
Marcus Huewe [Thu, 12 May 2016 19:36:12 +0000 (15:36 -0400)]
libext2fs: add fs_offset entry to the undo header

The fs_offset entry stores the filesystem offset. This allows for an
easy undo, because one does not have to remember/specify the
filesystem offset manually.
The fs_offset entry is implemented as a compatible feature.

Signed-off-by: Marcus Huewe <suse-tux@gmx.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agoe2undo: add "-o offset" option to specify the filesystem offset
Marcus Huewe [Thu, 12 May 2016 19:36:00 +0000 (15:36 -0400)]
e2undo: add "-o offset" option to specify the filesystem offset

This is useful if the filesystem is located at an arbitrary
offset instead of the beginning of a device or file.

Signed-off-by: Marcus Huewe <suse-tux@gmx.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agolibext2fs: fix key extension in undo_write_tdb
Marcus Huewe [Thu, 12 May 2016 19:35:44 +0000 (15:35 -0400)]
libext2fs: fix key extension in undo_write_tdb

Support key extension if the tdb_data_size is an arbitrary integer
multiple of the channel's block size. Before, key extension was only
possible if the tdb_data_size and the channel's block size were
equal.
Note: a key, whose data is the result of a short read, will be
extended if the tdb_data_size and the channel's block size are equal
(that's what the old code did) (if tdb_data_size is an arbitrary
integer multiple (> 1) of the channel's block size, the key might
be extended as well (depending on the keysize)).

Signed-off-by: Marcus Huewe <suse-tux@gmx.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agolibext2fs: fix offset code in undo_write_tdb
Marcus Huewe [Thu, 12 May 2016 19:35:04 +0000 (15:35 -0400)]
libext2fs: fix offset code in undo_write_tdb

The old code has some issues, for example, when backing up fs block 0
(can be reproduced via "mke2fs -z undo -b 1024 -E offset=1024 out 1024"):
* backing_blk_num is set to ULLONG_MAX instead of 0
* data is read from the beginning of the file instead of offset 1024
* data_ptr is set to read_ptr - 1024 ("invalid" address)

Hence, the wrong fs block is associated with the wrong data.
For details, see also commit 76da764639cbfcc998f13c263a11a4601bcb9961.

Signed-off-by: Marcus Huewe <suse-tux@gmx.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agotests: testcases for the offset handling in e2undo and undo_io.c
Marcus Huewe [Thu, 12 May 2016 19:26:09 +0000 (15:26 -0400)]
tests: testcases for the offset handling in e2undo and undo_io.c

The testcase "u_offset" tests/defines e2undo's new UI and offset
handling code. The testcase "u_mke2fs_opt_offset" documents some
issues with undo_io.c's old offset handling code (e.g., backup of
fs block 0, key extension (tdb_data_size != block_size) etc.).

Signed-off-by: Marcus Huewe <suse-tux@gmx.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agomke2fs: fix filesystem size calculation, if an offset is specified
Marcus Huewe [Thu, 12 May 2016 19:25:14 +0000 (15:25 -0400)]
mke2fs: fix filesystem size calculation, if an offset is specified

If a filesystem size is explicitly specified, it should be used without
subtracting the offset.

Signed-off-by: Marcus Huewe <suse-tux@gmx.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agotests: test "mke2fs -E offset=N" filesystem size calculation
Marcus Huewe [Thu, 12 May 2016 19:08:46 +0000 (15:08 -0400)]
tests: test "mke2fs -E offset=N" filesystem size calculation

If "mke2fs -E offset=N ..." is called without a specified filesystem size,
the offset should be subtracted from the default filesystem size (see
commit 87d9b2fb). If "mke2fs -E offset=N ..." is called with an
explicitly specified filesystem size, the specified filesystem size
should be used.

Also, call dd with the "iflag=fullblock" option, if it is going to read
from a pipe.

Signed-off-by: Marcus Huewe <suse-tux@gmx.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agodebian: make e2fsprogs.postinst abort on error v1.43-WIP-2016-05-12
Theodore Ts'o [Thu, 12 May 2016 05:42:58 +0000 (01:42 -0400)]
debian: make e2fsprogs.postinst abort on error

Also fix typo in the postinst script

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agoUpdate release notes for a 1.43-WIP release (12-May-2016)
Theodore Ts'o [Thu, 12 May 2016 05:02:53 +0000 (01:02 -0400)]
Update release notes for a 1.43-WIP release (12-May-2016)

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agoUpdate e2fsprogs translation template file
Theodore Ts'o [Thu, 12 May 2016 05:01:46 +0000 (01:01 -0400)]
Update e2fsprogs translation template file

8 years agofuse2fs.1: fix man page section of fuse2fs
Theodore Ts'o [Thu, 12 May 2016 04:02:07 +0000 (00:02 -0400)]
fuse2fs.1: fix man page section of fuse2fs

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agodebian: stop using dietlibc to build the static binaries
Theodore Ts'o [Thu, 12 May 2016 04:00:38 +0000 (00:00 -0400)]
debian: stop using dietlibc to build the static binaries

It's better to keep the e2fsprogs binaries consistently all using
glibc.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agolibext2fs: sanity check group argument to ext2fs_clear_{block,inode}_uninit()
Theodore Ts'o [Thu, 12 May 2016 03:23:06 +0000 (23:23 -0400)]
libext2fs: sanity check group argument to ext2fs_clear_{block,inode}_uninit()

Avoid a potential out-of-bounds memory access if the group passed to
ext2fs_clear_block_uninit() or ext2fs_clear_inode_uninit() is greater
than the number of groups in the file system.  This prevents a failure
in resize2fs when to allocate a block when growing the file system
significantly.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agomisc: avoid PATH_MAX dependency in create_inode.c
Theodore Ts'o [Wed, 11 May 2016 04:08:58 +0000 (00:08 -0400)]
misc: avoid PATH_MAX dependency in create_inode.c

Addresses-Debian-Bug: #822576

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agolibext2s: only define FS_IOC_FIEMAP on Linux systems
Theodore Ts'o [Wed, 11 May 2016 03:44:21 +0000 (23:44 -0400)]
libext2s: only define FS_IOC_FIEMAP on Linux systems

Hurd and *BSD is not going to have FS_IOC_FIEMAP, at least not at
Linux's codepoint.

Addresses-Debian-Bug: #822576

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agodebian: disable fus2fs for Hurd
Theodore Ts'o [Wed, 11 May 2016 03:41:38 +0000 (23:41 -0400)]
debian: disable fus2fs for Hurd

Hurd's libfuse is not compatible with the Linux version of libfuse.

Addresses-Debian-Bug: #822576

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agodebian: update initramfs in e2fsprogs's postinst script
Theodore Ts'o [Wed, 11 May 2016 03:27:04 +0000 (23:27 -0400)]
debian: update initramfs in e2fsprogs's postinst script

Addresses-Debian-Bug: #804237

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agoMore man page and usage message fixups
Theodore Ts'o [Wed, 11 May 2016 03:23:14 +0000 (23:23 -0400)]
More man page and usage message fixups

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agoresize2fs, libext2fs: fix bugs in sparse_super2 support
Theodore Ts'o [Wed, 11 May 2016 01:06:15 +0000 (21:06 -0400)]
resize2fs, libext2fs: fix bugs in sparse_super2 support

Fix resize2fs so that the location of the backup superblocks when the
sparse_super2 feature is enabled is properly set when growing the file
system from a single block group to larger file system sizes.

Also fix a bug where the block group summary statistics in some cases
when exapnding a sparse_super2 file system.

Finally, accurately calculate the file system metadata overhead of the
last block group in sparse_super2 file systems.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agomke2fs: support multiple -O options
Theodore Ts'o [Tue, 10 May 2016 21:41:08 +0000 (17:41 -0400)]
mke2fs: support multiple -O options

Some users will get confused and try to specify multiple -O options.
So teach mke2fs to treat "-O feature1 -O feature2" as
"-O feature1,feature2".

https://bugzilla.kernel.org/show_bug.cgi?id=117421

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agoutil: remove lib/support from the e2fsprogs-libs tar distribution
Theodore Ts'o [Tue, 10 May 2016 20:18:44 +0000 (16:18 -0400)]
util: remove lib/support from the e2fsprogs-libs tar distribution

The lib/support library is only used for internal e2fsprogs programs,
and it won't compile correctly due to the fact that lib/ext2fs isn't
included in the e2fsprogs-libs distribution anyway.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agoFix various man pages and usage message
Theodore Ts'o [Mon, 9 May 2016 02:12:41 +0000 (22:12 -0400)]
Fix various man pages and usage message

Thanks to pete@lyptonyx for doing a close pass editing of e2fsprogs's
man pages.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agolibe2p: change the long flag name for -P to be Project_Hierarchy
Theodore Ts'o [Mon, 9 May 2016 02:11:36 +0000 (22:11 -0400)]
libe2p: change the long flag name for -P to be Project_Hierarchy

This more clearly describes what the flag means.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agomke2fs: fix the parsing used for -E quotatype=usrquota:grpquota:prjquota
Theodore Ts'o [Mon, 9 May 2016 01:11:18 +0000 (21:11 -0400)]
mke2fs: fix the parsing used for -E quotatype=usrquota:grpquota:prjquota

Commit 2d2d799c7261 tried to use parse_quota_options(), which uses
commas to separate out the quota types.  Unfortunately, when parsing
extended options, commands are used to separate different extended
options.

To fix this, I've add a new support function parse_quota_type(), which
allows either commas or colons to used as a separator character, and
which manipulates a bit field to indicate which quota types should be
enabled.  Eventually tune2fs should be converted to use
parse_quota_type() as well, thus obsoleting parse_quota_options(), but
that's a more complicated cleanup patch for later.

Fix a lint warning which could the number of blocks to be incorretly
printed if it exceeds 2**32.

Also fix some typos and other minor bugs in the usage message.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agoe4crypt: remove debugging code which broke the set_policy subcommand
Theodore Ts'o [Sat, 7 May 2016 03:38:33 +0000 (23:38 -0400)]
e4crypt: remove debugging code which broke the set_policy subcommand

Also fixed some spelling typos in help messages.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agomke2fs: adjust the default file system size by the offset
Theodore Ts'o [Sun, 1 May 2016 04:57:19 +0000 (00:57 -0400)]
mke2fs: adjust the default file system size by the offset

If the user specifies an offset using -E offset without specifying an
explicit size, the system will use the block device (or file) size as
the default file system size.  If we are using the default file system
size, subtract out the offset so the resulting file system will stay
within the block device.  Also print a warning that this might not be
what the user wants.

Addresses-Debian-Bug: #803629

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agoUse texi2dvi --clean to work around a bug in texi2dvi
Theodore Ts'o [Sun, 1 May 2016 02:19:59 +0000 (22:19 -0400)]
Use texi2dvi --clean to work around a bug in texi2dvi

If the sources for e2fsprogs are located in a pathname that contains a
tilde character (which can happen when the sources are unpacked using
"apt-get source" when e2fsprogs has a pre-release test version),
texi2dvi will fail due to a bug (Debian bug #822492: "texinfo:
texi2dvi doesn't protect the ~ character in the second pass").  Work
around this bug by using texi2dvi --clean.

Addresses-Debian-Bug: #822227

Reported-by: svante.signell@gmail.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agomke2fs.8, badblocks.8: fix spelling errors and other miscellaneous typos
Theodore Ts'o [Thu, 28 Apr 2016 23:54:34 +0000 (19:54 -0400)]
mke2fs.8, badblocks.8: fix spelling errors and other miscellaneous typos

Reported-by: Pete <pete@leptonyx.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agofuse2fs: delete unused variables
Darrick J. Wong [Tue, 19 Apr 2016 19:21:00 +0000 (12:21 -0700)]
fuse2fs: delete unused variables

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agotests: rename e2image related tests
Theodore Ts'o [Mon, 25 Apr 2016 15:58:47 +0000 (11:58 -0400)]
tests: rename e2image related tests

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agoe2image: ignore checksum errors
Darrick J. Wong [Tue, 19 Apr 2016 19:20:30 +0000 (12:20 -0700)]
e2image: ignore checksum errors

Since e2image is used to capture broken fs images for debugging,
ignore checksum errors when creating the image.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agoe2fsck: clean up error messages when journal is corrupted
Theodore Ts'o [Sun, 17 Apr 2016 04:44:06 +0000 (00:44 -0400)]
e2fsck: clean up error messages when journal is corrupted

Update the tests to match with the new behavior and error messages

Also fix test_one so that it doesn't print the failed test output in
the case where the script does not exist.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agoFix build failure if --config-jbd-debug isn't enabled
Theodore Ts'o [Sun, 17 Apr 2016 04:23:48 +0000 (00:23 -0400)]
Fix build failure if --config-jbd-debug isn't enabled

This fixes a bug that was introduced recently in commit 1fc23b5e77.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agoe2fsck: don't abort if the journal is corrupted due to checksum errors
Theodore Ts'o [Sat, 16 Apr 2016 01:09:24 +0000 (21:09 -0400)]
e2fsck: don't abort if the journal is corrupted due to checksum errors

If e2fsck_run_ext3_journal() returns an error indicating that a CRC
error was detected, we shouldn't abort, but instead proceed so the
file system can be fixed.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agoe2fsck: don't try to set a UUID on metadata_csum file systems
Theodore Ts'o [Sat, 16 Apr 2016 00:51:36 +0000 (20:51 -0400)]
e2fsck: don't try to set a UUID on metadata_csum file systems

If the UUID field is NULL, e2fsck will try to generate and set a new
UUID.  This will cause massive problems if the metadata_csum feature
is set, so avoid doing so in that case.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agoe2fsck: use specific CRC and corruption errors in journal recovery
Theodore Ts'o [Fri, 15 Apr 2016 23:35:02 +0000 (19:35 -0400)]
e2fsck: use specific CRC and corruption errors in journal recovery

Sync up with kernel commit 6a797d27: "ext4: call out CRC and
corruption errors with specific error codes".

This allows us to distinguish between CRC errors and I/O errors.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agoFix support for configure --enable-jbd-debug
Theodore Ts'o [Fri, 15 Apr 2016 23:01:38 +0000 (19:01 -0400)]
Fix support for configure --enable-jbd-debug

We haven't used this in a while, so it's bitrotted a bit.  Fix it up
so that it works correctly.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agoMerge branch 'maint' into next
Theodore Ts'o [Fri, 15 Apr 2016 15:33:30 +0000 (11:33 -0400)]
Merge branch 'maint' into next

8 years agoe2image: don't leak progress info to stdout
Eric Sandeen [Fri, 15 Apr 2016 03:20:46 +0000 (22:20 -0500)]
e2image: don't leak progress info to stdout

Commit c8ee0d60 fixed most of these, but missed this one.

# e2image -r -p <device> - > imagefile

leads to a corrupted image due to the "Scanning inodes..."
printf going to stdout.

Reported-by: Alex Markley <alex@malexmedia.net>
Addresses-Red-Hat-Bugzilla: #1327329
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agoe2fsck: Print "REBOOT SYSTEM" instead of "REBOOT LINUX"
Theodore Ts'o [Sun, 27 Mar 2016 03:23:43 +0000 (23:23 -0400)]
e2fsck: Print "REBOOT SYSTEM" instead of "REBOOT LINUX"

As a nod to people building e2fsprogs for FreeBSD or Hurd.

Addresses-Debian-Bug: #769838

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agoFix missing prototype warnings caused by missing header files
Theodore Ts'o [Sun, 27 Mar 2016 03:18:34 +0000 (23:18 -0400)]
Fix missing prototype warnings caused by missing header files

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agomke2fs: fix for the "-E offset=N" option
Marcus Huewe [Sun, 27 Mar 2016 02:26:40 +0000 (22:26 -0400)]
mke2fs: fix for the "-E offset=N" option

Configure the io channel with the specified offset before
calling mke2fs_discard_device(). Otherwise the data before offset
is discarded.

Signed-off-by: Marcus Huewe <suse-tux@gmx.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agolibext2fs: fix offset support in unix_io.c
Marcus Huewe [Sun, 27 Mar 2016 02:26:02 +0000 (22:26 -0400)]
libext2fs: fix offset support in unix_io.c

Added offset support to the following functions:
- unix_cache_readahead
- unix_discard
- unix_zeroout

Signed-off-by: Marcus Huewe <suse-tux@gmx.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agotests: add testcase for "mke2fs -E offset=N..."
Marcus Huewe [Sun, 27 Mar 2016 02:24:51 +0000 (22:24 -0400)]
tests: add testcase for "mke2fs -E offset=N..."

Test that mke2fs does not modify any data before the offset and
after the end of the filesystem.

Signed-off-by: Marcus Huewe <suse-tux@gmx.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agoblkid: fix blkid time diff bug
Jeff Sharkey [Wed, 16 Oct 2013 22:42:12 +0000 (15:42 -0700)]
blkid: fix blkid time diff bug

When calculating time diffs, use difftime() instead of risking
integer overflow.  Also build a "blkid" binary.

Addresses-Google-Bug: #11175082
Change-Id: I23521f45204574bb32f152926401c2cbad93175b

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agollseek: setup the correct seek for ext2fs_llseek
JP Abgrall [Fri, 25 Mar 2016 16:00:07 +0000 (12:00 -0400)]
llseek: setup the correct seek for ext2fs_llseek

After
  http://git.kernel.org/cgit/fs/ext2/e2fsprogs.git/commit/lib/ext2fs/llseek.c?id=274d46e1d35af423d0292d63c4d0ad7a03be82ba

with
  __linux__
  defined(HAVE_LSEEK64) && defined(HAVE_LSEEK64_PROTOTYPE)
  SIZEOF_OFF_T >= SIZEOF_LONG_LONG
it leads to ext2fs_llseek() doing a "return lseek(fd, offset, origin);"
Which  fails for offsets > 32bit.

Also, with
  __linux__
  !(defined(HAVE_LSEEK64) && defined(HAVE_LSEEK64_PROTOTYPE))
  defined(HAVE_LLSEEK)
  SIZEOF_OFF_T == SIZEOF_LONG_LONG
my_llseek is not defined at all. And there is no need to define
llseek as lseek, as llseek is never used.
Luckily ext2fs_llseek() then does "return lseek(...);"
It would seem that my_llseek should be used in both places.

Addresses-Google-Bug: #13340735
Change-Id: Ie7330300c9c1ca103eaaef97536dcf10adbbba02
Signed-off-by: JP Abgrall <jpa@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agoMerge branch 'maint' into next
Theodore Ts'o [Tue, 22 Mar 2016 04:03:09 +0000 (00:03 -0400)]
Merge branch 'maint' into next

8 years agotests: fix Makefile so it is portable to gmake 3.x
Theodore Ts'o [Tue, 22 Mar 2016 04:01:19 +0000 (00:01 -0400)]
tests: fix Makefile so it is portable to gmake 3.x

In commit 0355d6d047884f5b we used a Makefile shell assignment syntax
which is compatible with pmake and gmake 4.x, but which breaks on
gmake 3.x.  So only use the pmake-compatible construction if we are
not using GNU make.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agoFix FreeBSD portability problems
Theodore Ts'o [Tue, 22 Mar 2016 03:43:41 +0000 (23:43 -0400)]
Fix FreeBSD portability problems

FreeBSD doesn't have libintl support built into the libc, and
libsupport requires libintl support.  So we need to make sure it is
available when we link against the libsupport library.

Also, work around *BSD's interesting interpretation of how
_XOPEN_SOURCE is supposed to work.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agoMerge branch 'maint' into next
Theodore Ts'o [Mon, 21 Mar 2016 17:21:03 +0000 (13:21 -0400)]
Merge branch 'maint' into next

8 years agolibext2fs: make sure ismounted.c explicitly pulls in <sys/types.h>
Theodore Ts'o [Mon, 21 Mar 2016 17:09:54 +0000 (13:09 -0400)]
libext2fs: make sure ismounted.c explicitly pulls in <sys/types.h>

The major() cpp macro is defined as requiring sys/types.h to be
included with _BSD_SOURCE defined.  However, in older glibc's this
hasn't been strictly required and the stdlib.h header file included
sys/types.h implicitly.  Fix this so that more aggressive
distributions run into build errors.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
in with andchanges. Lines starting

8 years agoFix warnings caused by glibc 2.20
Theodore Ts'o [Mon, 21 Mar 2016 17:01:27 +0000 (13:01 -0400)]
Fix warnings caused by glibc 2.20

Glibc has depcreated _SVID_SOURCE and _BSD_SOURCE in favor of
_DEFAULT_SOURCE.  So define _DEFAULT_SOURCE to shut up glibc 2.20

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agolibsupport: fix potential resource leaks in the profile code
Theodore Ts'o [Fri, 18 Mar 2016 21:14:15 +0000 (17:14 -0400)]
libsupport: fix potential resource leaks in the profile code

These were found by Coverity.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agochattr: fix verbose message while setting the project id
Theodore Ts'o [Fri, 18 Mar 2016 20:49:51 +0000 (16:49 -0400)]
chattr: fix verbose message while setting the project id

This was caused by a cut and paste error.  (Thanks to Coverity for
pointing this out).

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agoutil: add get-var script
Theodore Ts'o [Fri, 18 Mar 2016 20:29:19 +0000 (16:29 -0400)]
util: add get-var script

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agoAndroid.mk: add missing source files from lib/e2p/Android.mk
Theodore Ts'o [Fri, 18 Mar 2016 20:24:53 +0000 (16:24 -0400)]
Android.mk: add missing source files from lib/e2p/Android.mk

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agolibsupport: fix function prototype for parse_quota_opts
Theodore Ts'o [Fri, 18 Mar 2016 20:11:53 +0000 (16:11 -0400)]
libsupport: fix function prototype for parse_quota_opts

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agotune2fs: don't include journal recovery when building for Android
Theodore Ts'o [Fri, 18 Mar 2016 20:07:34 +0000 (16:07 -0400)]
tune2fs: don't include journal recovery when building for Android

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agoAndroid.mk: fix up the library -host naming convention change
Theodore Ts'o [Fri, 18 Mar 2016 19:24:39 +0000 (15:24 -0400)]
Android.mk: fix up the library -host naming convention change

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agofuse2fs.1: add manual page for fuse2fs
Theodore Ts'o [Fri, 18 Mar 2016 19:23:35 +0000 (15:23 -0400)]
fuse2fs.1: add manual page for fuse2fs

Also add libfuse-dev to the Debian build depends so that fuse2fs gets
built for Debian.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agoFix various clang and gcc -Wall warnings
Theodore Ts'o [Fri, 18 Mar 2016 16:45:19 +0000 (12:45 -0400)]
Fix various clang and gcc -Wall warnings

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agolibext2fs: fix build failure in lib/ext2fs/swapfs on big-endian systems
Theodore Ts'o [Fri, 18 Mar 2016 02:39:10 +0000 (22:39 -0400)]
libext2fs: fix build failure in lib/ext2fs/swapfs on big-endian systems

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agoUpdate lib/ext2fs/Makefile.in using "make depend" v1.43-WIP-2016-03-15
Theodore Ts'o [Tue, 15 Mar 2016 05:50:40 +0000 (01:50 -0400)]
Update lib/ext2fs/Makefile.in using "make depend"

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agoUpdate translation template file
Theodore Ts'o [Tue, 15 Mar 2016 05:49:00 +0000 (01:49 -0400)]
Update translation template file

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agoUpdate release notes for a 1.43-WIP release (14-Mar-2016)
Theodore Ts'o [Tue, 15 Mar 2016 05:37:28 +0000 (01:37 -0400)]
Update release notes for a 1.43-WIP release (14-Mar-2016)

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agodebian: update debian policy conformance to 3.9.7
Theodore Ts'o [Tue, 15 Mar 2016 05:30:55 +0000 (01:30 -0400)]
debian: update debian policy conformance to 3.9.7

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agoAndroid.mk: Replace _host suffix with more standard -host suffix
Alex Deymo [Thu, 10 Dec 2015 02:15:25 +0000 (18:15 -0800)]
Android.mk: Replace _host suffix with more standard -host suffix

Most libraries use the "-host" suffix when building for the host. This
patch renames all the libraries to use -host instead of _host.

Addresses-Google-Bug: #24619596
TEST=make dist

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agoconfigure.ac: fix up Debian naming scheme for its orig.tar.gz file
Theodore Ts'o [Tue, 15 Mar 2016 05:10:29 +0000 (01:10 -0400)]
configure.ac: fix up Debian naming scheme for its orig.tar.gz file

We are using a new convention for the 1.43-WIP releases which should
be less confusion by replacing the hyphens by periods (e.g.,
1.43~WIP.2016.03.06 instead of 1.43~WIP-2016-03-06).  This avoids
confusion regarding the debian release number (which uses the last
hyphen in the version string to separate the upstream version from the
release number).

Also fix a typo in the version number used in the debian changelog and
e2fslibs.symbols file.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agogen-android-files: create the MODULE_LICENSE_GPL and README.version files
Damien Miller [Mon, 14 Mar 2016 23:07:26 +0000 (19:07 -0400)]
gen-android-files: create the MODULE_LICENSE_GPL and README.version files

These package version metadata files will be used for automated
notification of external vulnerability reports in Android.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agolibuuid: Silence warnings in lib/uuid when building on Android
James Hawkins [Mon, 22 Feb 2016 23:29:58 +0000 (15:29 -0800)]
libuuid: Silence warnings in lib/uuid when building on Android

-Wno-unused-function
-Wno-unused-parameter

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 years agoAndroid.mk: export uuid/uuid.h
Mark Salyzyn [Mon, 14 Mar 2016 22:41:38 +0000 (18:41 -0400)]
Android.mk: export uuid/uuid.h

Addresses-Google-Bug: #23181629
Addresses-Google-Bug: #24133481

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>