]> git.ipfire.org Git - thirdparty/e2fsprogs.git/log
thirdparty/e2fsprogs.git
16 years agoNew bitmap and inode table allocation for FLEX_BG e2fsprogs-interim
Jose R. Santos [Fri, 29 Feb 2008 14:39:03 +0000 (09:39 -0500)] 
New bitmap and inode table allocation for FLEX_BG

Change the way we allocate bitmaps and inode tables if the FLEX_BG
feature is used at mke2fs time.  It places calculates a new offset for
bitmaps and inode table base on the number of groups that the user
wishes to pack together using the new "-G" option.  Creating a
filesystem with 64 block groups in a flex group can be done by:

mke2fs -j -I 256 -O flex_bg -G 32 /dev/sdX

Signed-off-by: Jose R. Santos <jrs@us.ibm.com>
Signed-off-by: Valerie Clement <valerie.clement@bull.net>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoThis patch adds basic flex_bg support to the e2fsprogs-interim branch.
Jose R. Santos [Fri, 29 Feb 2008 14:37:40 +0000 (09:37 -0500)] 
This patch adds basic flex_bg support to the e2fsprogs-interim branch.

Signed-off-by: Jose R. Santos <jrs@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agobuilding e2fsprogs-interim
Eric Sandeen [Thu, 14 Feb 2008 18:26:12 +0000 (12:26 -0600)] 
building e2fsprogs-interim

I needed this patch to build e2fsprogs-interim, to fix a parallel make
problem

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoe2fsprogs-lts-make_rpms.patch
Andreas Dilger [Sat, 2 Feb 2008 08:57:34 +0000 (01:57 -0700)] 
e2fsprogs-lts-make_rpms.patch

Allow "make rpm" to take some extra configure options from the build
environment without having to patch the code.

Build the tarball in a temporary directory instead of the e2fsprogs
source directory.

Signed-off-by: Michael MacDonald <Michael.Macdonald@Sun.COM>
Signed-off-by: Andreas Dilger <adilger@sun.com>
16 years agoe2fsprogs-debugfs-supported_features.patch
Andreas Dilger [Sat, 2 Feb 2008 08:56:07 +0000 (01:56 -0700)] 
e2fsprogs-debugfs-supported_features.patch

Print out the currently supported features of e2fsprogs/libext2fs
via a new "debugfs supported_features" command.

Signed-off-by: Kalpak Shah <kalpak@clusterfs.com>
Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
16 years agoe2fsprogs-fiemap.patch
Andreas Dilger [Sat, 2 Feb 2008 08:54:41 +0000 (01:54 -0700)] 
e2fsprogs-fiemap.patch

Add support for ioctl(FIEMAP) to filefrag.  If the kernel supports FIEMAP
the filefrag program prefers this more efficient mechanism to get extent
information instead of repeated FIBMAP calls.

Signed-off-by: Kalpak Shah <kalpak@clusterfs.com>
Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
16 years agoe2fsprogs-i_size-corruption.patch
Andreas Dilger [Sat, 2 Feb 2008 08:54:11 +0000 (01:54 -0700)] 
e2fsprogs-i_size-corruption.patch

Fix handling of block preallocation support in cases where the kernel
PAGE_SIZE is larger than the filesystem blocksize.

Signed-off-by: Kalpak Shah <kalpak@clusterfs.com>
Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
16 years agoe2fsprogs-tests-f_jchksum_remount.patch
Andreas Dilger [Sat, 2 Feb 2008 08:53:18 +0000 (01:53 -0700)] 
e2fsprogs-tests-f_jchksum_remount.patch

Check a journal that was mounted by a kernel without CHECKSUM
support after the CHECKSUM flag is set in the journal superblock.

Signed-off-by: "Andreas Dilger <adilger@sun.com>"
16 years agoe2fsprogs-tests-f_jchksum_blast_trans.patch
Andreas Dilger [Sat, 2 Feb 2008 08:52:27 +0000 (01:52 -0700)] 
e2fsprogs-tests-f_jchksum_blast_trans.patch

Regression test for the case of an incomplete last transaction to
not consider it corrupt.

Signed-off-by: "Andreas Dilger <adilger@sun.com>"
16 years agoe2fsprogs-tests-f_jchksum_bblk.patch
Andreas Dilger [Sat, 2 Feb 2008 08:50:11 +0000 (01:50 -0700)] 
e2fsprogs-tests-f_jchksum_bblk.patch

Regression test for journal checksum feature where there is a corrupt
block in an uncommitted transaction.

Signed-off-by: "Andreas Dilger <adilger@sun.com>"
16 years agoe2fsprogs-journal_chksum.patch
Andreas Dilger [Sat, 2 Feb 2008 08:49:14 +0000 (01:49 -0700)] 
e2fsprogs-journal_chksum.patch

E2fsprogs part of Journal Checksum feature.

This adds support for journals with the INCOMPAT_ASYNC_COMMIT and
COMPAT_CHECKSUM features.

If CHECKSUM is set, each transaction has a checksum of the full
transaction and it is verified before the transaction is replayed.
If any interior block is missing or corrupted, or if the transaction is
incomplete it will not be replayed.

The ASYNC_COMMIT feature allows the kernel to avoid waiting for the
transaction (meta)data to commit before writing the journal commit block.

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: Girish Shilamkar <girish@clusterfs.com>
16 years agoe2fsprogs-mmp.patch
Andreas Dilger [Sat, 2 Feb 2008 08:48:32 +0000 (01:48 -0700)] 
e2fsprogs-mmp.patch

Add multi-mount protection support to libext2fs (INCOMPAT_MMP feature).

This allows mke2fs, e2fsck, and others to detect if the filesystem is
mounted on a remote node (on SAN disks) and avoid corrupting the
filesystem.  For e2fsprogs this only means that it check the MMP block
to see if the filesystem is in use, and mark the filesystem busy while
e2fsck is running on the system.

There is no requirement that e2fsck updates the MMP block in any regular
interval, but e2fsck does this occasionally to provide additional
information to the sysadmin in case of conflict.

Signed-off-by: Kalpak Shah <kalpak@clusterfs.com>
Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
16 years agoe2fsprogs-stride_option.patch
Andreas Dilger [Sat, 2 Feb 2008 08:47:06 +0000 (01:47 -0700)] 
e2fsprogs-stride_option.patch

Add support for setting the s_raid_stride and s_raid_stripe_width
fields in the superblock via mke2fs and tune2fs.c.  This is useful
for mballoc to align block allocation on the RAID stripe boundaries.

Fix up the debugfs "ssv" command to set a number of new superblock fields.

Signed-off-by: Rupesh Thakare <rupesh@clusterfs.com>
Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
16 years agoe2fsprogs-tests-f_random_corruption.patch
Andreas Dilger [Sat, 2 Feb 2008 08:46:27 +0000 (01:46 -0700)] 
e2fsprogs-tests-f_random_corruption.patch

The f_random_corruption test enables a random subset of filesystem features,
picks one of the valid filesystem block and inode sizes, and a random device
size and creates a new filesystem with those parameters.

It is possible to disable the running of the test by setting the environment
variable F_RANDOM_CORRUPTION=skip.  By default the test script is run only
one time, but setting the LOOP_COUNT variable allows the test to run multiple
times.

If the script is running as root the filesystem is mounted and populated with
file data to allow a more useful test filesystem to be generated.  In some
cases the kernel may not support the requested filesystem features and the
filesystem cannot be mounted.  This is not considered a test failure.

The resulting filesystem is corrupted with both random data and by shifting
data from one part of the device to another and then repaired by e2fsck.
In some rare cases the random corruption is severe enough that the filesystem
is not recoverable (e.g. small filesystem with no backup superblock has bad
superblock corruption) but in most cases "e2fsck -fy" should be able to fix
all errors in some way.

After e2fsck has repaired the filesystem, it is optionally mounted (if the
environment variable MOUNT_AFTER_CORRUPTION=yes is set) and the test files
created in the filesystem are deleted.  This verifies that the fixes in the
filesystem are sufficient for the kernel to use the filesystem without error.
Since there is some possibility of the kernel oopsing if there is a filesystem
bug, this part of the test is not enabled by default.

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: Kalpak Shah <kalpak@clusterfs.com>
16 years agoe2fsprogs-tests-f_ibadness_bad_extents.patch
Andreas Dilger [Sat, 2 Feb 2008 08:44:44 +0000 (01:44 -0700)] 
e2fsprogs-tests-f_ibadness_bad_extents.patch

Test case for bad extents inodes.

Signed-off-by: Andreas Dilger <adilger@sun.com>
16 years agoe2fsprogs-tests-f_ibadness.patch
Andreas Dilger [Sat, 2 Feb 2008 08:43:40 +0000 (01:43 -0700)] 
e2fsprogs-tests-f_ibadness.patch

Test case for bad inode detection

Signed-off-by: Andreas Dilger <adilger@sun.com>
16 years agoe2fsprogs-ibadness-counter.patch
Andreas Dilger [Sat, 2 Feb 2008 08:41:00 +0000 (01:41 -0700)] 
e2fsprogs-ibadness-counter.patch

The present e2fsck code checks the inode, per field basis. It doesn't
take into consideration to total sanity of the inode. This may cause
e2fsck turning a garbage inode into an apparently sane inode ("It is a
vessel of fertilizer, and none may abide its strength.").

The following patch adds a heuristics to detect the degree of badness of
an inode. icount mechanism is used to keep track of the badness of every
inode. The badness is increased as various fields in inode are found to
be corrupt. Badness above a certain threshold value results in deletion
of the inode. The default threshold value is 7, it can be specified to
e2fsck using "-E inode_badness_threshold=<value>"

This can avoid lengthy pass1b shared block processing, where a corrupt
chunk of the inode table has resulted in a bunch of garbage inodes
suddenly having shared blocks with a lot of good inodes (or each other).

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: Girish Shilamkar <girish@clusterfs.com>
16 years agoe2fsprogs-tests-f_expisize_ea_del.patch
Theodore Ts'o [Sat, 2 Feb 2008 08:40:03 +0000 (01:40 -0700)] 
e2fsprogs-tests-f_expisize_ea_del.patch

Test case for expanding inode size where there is not enough room
for the requested new inode size.  Prompt user to delete one or more
EAs (default is to abort).

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
16 years agoe2fsprogs-tests-f_expisize.patch
Andreas Dilger [Sat, 2 Feb 2008 08:38:20 +0000 (01:38 -0700)] 
e2fsprogs-tests-f_expisize.patch

Test case for expanding inode size

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
16 years agoe2fsprogs-expand-extra-isize.patch
Andreas Dilger [Sat, 2 Feb 2008 08:36:52 +0000 (01:36 -0700)] 
e2fsprogs-expand-extra-isize.patch

This patch adds a "-E expand_extra_isize" feature which makes sure that
_every_ used inode has i_extra_isize >= s_min_extra_isize if
s_min_extra_isize is set. Else it makes sure that i_extra_isize of every
inode is equal to sizeof(ext2_inode_large) - 128.

This is useful for the case where nanosecond timestamps or 64-bit inode
version fields are required for all inodes in the filesystem.

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: Kalpak Shah <kalpak@clusterfs.com>
16 years agoe2fsprogs-nlinks-flag.patch
Andreas Dilger [Sat, 2 Feb 2008 08:36:10 +0000 (01:36 -0700)] 
e2fsprogs-nlinks-flag.patch

If there are any directories with > 65000 subdirectories, enable the
DIR_NLINK feature in the superblock.  If there are any directories
that formerly had > 65000 subdirs (i_links_count == 1) but no longer
do, don't consider this an error to alert the user about, but silently
fix the link count to the currently counted link count.

The DIR_NLINK feature is not disabled if set but no many-subdir directories
are found, so that the kernel is not required to enable it on-the-fly.  The
admin should set it with tune2fs instead.

16 years agoe2fsprogs-uninit.patch
Andreas Dilger [Sat, 2 Feb 2008 08:34:44 +0000 (01:34 -0700)] 
e2fsprogs-uninit.patch

Support for the COMPAT_GDT_CSUM (uninit_groups) feature.

Allows skipping uninitialized inode and block bitmap checks, and
skipping unused parts of the inode table.  Can dramatically speed
up e2fsck on large filesystems where the inode table is mostly
unused.

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: Girish Shilamkar <girish@clusterfs.com>
Signed-off-by: Kalpak Shah <kalpak@clusterfs.com>
16 years agoe2fsprogs-SLES10--m-support.patch
Andreas Dilger [Sat, 2 Feb 2008 08:30:13 +0000 (01:30 -0700)] 
e2fsprogs-SLES10--m-support.patch

SLES9 patch to add "fsck -m" option to skip checking mounted filesystems.
This isn't in their upstream e2fsprogs, since SLES uses the fsck in
util-linux, but is needed for compatibility.

16 years agoe2fsprogs-config-before-cmdline.patch
Andreas Dilger [Sat, 2 Feb 2008 08:29:25 +0000 (01:29 -0700)] 
e2fsprogs-config-before-cmdline.patch

The patch changes the order that the config file and command line are
parsed so that command line has precedence.  It also allows multiple
-E options to be specified on the command line.

Signed-off-by: Jim Garlick <garlick@llnl.gov>
Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
16 years agoe2fsprogs-extents.patch
Andreas Dilger [Sat, 2 Feb 2008 08:27:01 +0000 (01:27 -0700)] 
e2fsprogs-extents.patch

Support for checking 32-bit extents format inodes and the INCOMPAT_EXTENTS
feature.

Clear the high 16 bits of extents and index entries, since the
extents patches did not do this explicitly.  Some parts of this
code need fixing for checking > 32-bit block filesystems (when
INCOMPAT_64BIT support is added), marked "FIXME: 48-bit support".

Verify extent headers in blocks, logical ordering of extents,
logical ordering of indexes.

Add explicit checking of {d,t,}indirect and index blocks to detect
corruption instead of implicitly doing this by checking the referred
blocks and only block-at-a-time correctness.  This avoids incorrectly
invoking the very lengthy duplicate blocks pass for bad indirect/index
blocks.  We may want to tune the "threshold" for how many errors make
a "bad" indirect/index block.

Add ability to split or remove extents in order to allow extent
reallocation during the duplicate blocks pass.

16 years agoe2fsprogs-nlinks.patch
Andreas Dilger [Sat, 2 Feb 2008 08:25:03 +0000 (01:25 -0700)] 
e2fsprogs-nlinks.patch

Add support for the DIR_NLINK feature.

This patch includes the changes required to e2fsck to understand the
nlink count changes made in the kernel. In pass2, while counting the
links for a directory, if the link count exceeds 65000, its permanently
set to EXT2_LINK_MAX + 10. In pass4, when the counted and actual nlink
counts are compared, e2fsck does not flag an error if counted links =
EXT2_NLINK_MAX + 10 and existing link count is 1.

It also handles the case when a directory had more than 65000 subdirs
and they were later deleted. The nlink count of such a directory remains
1. In pass4 if counted links are 2 and if existing nlink count = 1,
e2fsck corrects the nlink count without displaying any errors.

The file hard link count is also increased to 65000, but this cannot be
exceeded.

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: Kalpak Shah <kalpak@clusterfs.com>
16 years agoe2fsprogs-tests-f_ea_checks.patch
Andreas Dilger [Sat, 2 Feb 2008 08:22:05 +0000 (01:22 -0700)] 
e2fsprogs-tests-f_ea_checks.patch

Test case for various types of extended attribute block corruption

Signed-off-by: Andreas Dilger <adilger@sun.com>
16 years agoe2fsprogs-tests-f_unsorted_EAs.patch
Andreas Dilger [Sat, 2 Feb 2008 08:22:05 +0000 (01:22 -0700)] 
e2fsprogs-tests-f_unsorted_EAs.patch

Test case for allowing unsorted EAs in the fast in-inode space.

Signed-off-by: Andreas Dilger <adilger@sun.com>
16 years agoe2fsprogs-extended_ops.patch
Andreas Dilger [Sat, 2 Feb 2008 08:17:44 +0000 (01:17 -0700)] 
e2fsprogs-extended_ops.patch

Minor reformatting patch to make applying later patches easier.

Signed-off-by: Andreas Dilger <adilger@sun.com>
16 years agoe2fsprogs-eacheck.patch
Andreas Dilger [Sat, 2 Feb 2008 08:16:32 +0000 (01:16 -0700)] 
e2fsprogs-eacheck.patch

Verify in-inode EA structure.
Allow in-inode EAs to have a checksum.
Connect zero-length inodes that have an EA to lost+found.

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
16 years agoe2fsprogs-specdotin.patch
Andreas Dilger [Sat, 2 Feb 2008 08:14:02 +0000 (01:14 -0700)] 
e2fsprogs-specdotin.patch

Add the distro type to the RPM release number, so that it is
possible release multiple distro packages without having conflicting
RPM package names.

Allow the RPM built from upstream to replace the split packages provided
by the distros.  At some point in the future it may be desirable to also
split the RPM built by this spec file, but this is complicated by the
fact that SLES and RHEL have different splits.

Signed-off-by: Girish Shilamkar <girish.shilamkar@sun.com>
Signed-off-by: Andreas Dilger <adilger@sun.com>
16 years agoSet the C locale in the tests/test_script driver
Theodore Ts'o [Sun, 10 Feb 2008 12:58:08 +0000 (07:58 -0500)] 
Set the C locale in the tests/test_script driver

Since the test_script driver uses [A-Za-z], we need to set the locale
so we don't get bitten on locals where the sort order might be
different.

Addresses-Sourceforge-Bug: #1890526

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoFix incorrect distribution name in Debian's Changelog
Theodore Ts'o [Sun, 10 Feb 2008 05:24:53 +0000 (00:24 -0500)] 
Fix incorrect distribution name in Debian's Changelog

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoUpdate release notes, version files for 1.40.6 release v1.40.6
Theodore Ts'o [Sun, 10 Feb 2008 05:16:37 +0000 (00:16 -0500)] 
Update release notes, version files for 1.40.6 release

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agolibcom_err: Use thread local storage to fix reentrancy problems
Theodore Ts'o [Sun, 10 Feb 2008 04:39:27 +0000 (23:39 -0500)] 
libcom_err: Use thread local storage to fix reentrancy problems

Address the theoretical problem of two threads trying to format a
different unknown error code by using TLS.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoDocument the BLKID_FILE environment variable in the libblkid man page
Theodore Ts'o [Sun, 10 Feb 2008 04:35:03 +0000 (23:35 -0500)] 
Document the BLKID_FILE environment variable in the libblkid man page

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoUpdate e2fsprogs translation template and Vietnamese and Czech translations
Theodore Ts'o [Sun, 10 Feb 2008 04:19:35 +0000 (23:19 -0500)] 
Update e2fsprogs translation template and Vietnamese and Czech translations

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoblkid: Add support for returning labels for UDF filesystems
Theodore Ts'o [Sun, 10 Feb 2008 04:12:56 +0000 (23:12 -0500)] 
blkid: Add support for returning labels for UDF filesystems

Addresses-Sourceforge-Bug: #1886394

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoDon't try to create $DESTDIR/etc/init.d as part of make install
Theodore Ts'o [Sun, 10 Feb 2008 03:34:43 +0000 (22:34 -0500)] 
Don't try to create $DESTDIR/etc/init.d as part of make install

This isn't necessary since we don't install the init.d script (and
it's not the recommended way to start uuidd anyway).

Addresses-Sourceforge-Bug: #1885085

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoblkid: Flush cached filesystem information on any error other than EPERM
Theodore Ts'o [Sun, 10 Feb 2008 03:30:20 +0000 (22:30 -0500)] 
blkid: Flush cached filesystem information on any error other than EPERM

USB devices can return ENOMEDIUM, and when the filesystem cached
information wasn't flushed, it resulted in the wrong location of a
filesystem to be returned to the caller.  The only justification for
using cached information when the open fails is in the case of a
permission denied error.

Addresses-Debian-Bug: #463787

16 years agoAllow tune2fs to set and clear the test_fs flag on ext4 filesystems
Theodore Ts'o [Sun, 10 Feb 2008 03:22:38 +0000 (22:22 -0500)] 
Allow tune2fs to set and clear the test_fs flag on ext4 filesystems

Also allow the label to be set/cleared on ext4 filesystems via e2label
and tune2fs.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoblkid: Automatically chose between ext4 and ext4dev as appropriate
Theodore Ts'o [Fri, 8 Feb 2008 21:04:12 +0000 (16:04 -0500)] 
blkid: Automatically chose between ext4 and ext4dev as appropriate

Add logic that on Linux systems will check for the presence of the
ext4dev filesystem; if it isn't present, fall back to ext4 for
filesystems that are marked as being "OK for use on test filesystem
code".  If they are OK for use for in-development filesystem code, it
should also be fine to use stable filesystem code if there is no test
filesystem code (ext4dev) available.

The reverse is not true, of course.  We don't ever want to mount a
production filesystem using test filesystem code unless the user gives
us explicit permission via "tune2fs -E test_fs".

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoFix bug in e2fsck which caused it to core dump if --enable-jbd-debug is used
Theodore Ts'o [Thu, 31 Jan 2008 19:22:24 +0000 (14:22 -0500)] 
Fix bug in e2fsck which caused it to core dump if --enable-jbd-debug is used

Missing curly braces from a python programmer; my bad for noticing it!

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agodebian: Fix packaging problem caused by dpkg 1.14.16
Theodore Ts'o [Wed, 30 Jan 2008 12:20:54 +0000 (07:20 -0500)] 
debian: Fix packaging problem caused by dpkg 1.14.16

Addresses-Debian-Bug: #436058

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoUpdate release notes, version files for 1.40.5 release v1.40.5
Theodore Ts'o [Mon, 28 Jan 2008 01:01:25 +0000 (20:01 -0500)] 
Update release notes, version files for 1.40.5 release

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoCreate filesystems with the ext_attr feature by default
Theodore Ts'o [Mon, 28 Jan 2008 00:38:46 +0000 (19:38 -0500)] 
Create filesystems with the ext_attr feature by default

Since recent kernels have a tendency to set this feature willy-nilly,
let's just enable by default.  It's only very old kernels that don't
support it any more.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoCreate new filesystems with 256-byte inodes by default
Theodore Ts'o [Mon, 28 Jan 2008 00:30:27 +0000 (19:30 -0500)] 
Create new filesystems with 256-byte inodes by default

This makes it easier to upgrade to ext4 in the future, and it speeds
up extended attributes handling --- important on SELinux systems!

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoDon't build e2fsck statically by default anymore
Theodore Ts'o [Sun, 27 Jan 2008 22:43:10 +0000 (17:43 -0500)] 
Don't build e2fsck statically by default anymore

Also removed the --enable-dynamic-static configure option.

Unfortunately the usefulness of building e2fsck statically is gone on
all modern distributions, since everything else on the system is built
dynamically these days.  In fact on some distributions it is almost
impossible to build programs statically any more.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agodebian: Don't use dietlibc on platforms that don't support it
Theodore Ts'o [Sun, 27 Jan 2008 22:20:44 +0000 (17:20 -0500)] 
debian: Don't use dietlibc on platforms that don't support it

Addresses-Debian-Bug: #459475

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoe2image: Fix potential overflow if the device name is too long
Theodore Ts'o [Sun, 27 Jan 2008 20:45:30 +0000 (15:45 -0500)] 
e2image: Fix potential overflow if the device name is too long

Adapted from SLES's patch: e2fsprogs-strncat.patch

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoUse lseek() instead of llseek() of sizeof(long) == sizeof(long long)
Theodore Ts'o [Sun, 27 Jan 2008 05:35:32 +0000 (00:35 -0500)] 
Use lseek() instead of llseek() of sizeof(long) == sizeof(long long)

Previously we used a hard-coded test where for the Alpha and the IA64,
we used lseek instead of llseek().  Generalize this to whenver
sizeof(long) is the same as sizeof(long long).

It turns out this fixes a FTBFS problem on the x86_64 for Debian,
since dietlibc doesn't provide llseek() on that architecture.

Addresses-Debian-Bug: #459614

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agolibuuid: Make sure execl() variadic function is properly terminated
Theodore Ts'o [Sun, 27 Jan 2008 05:22:52 +0000 (00:22 -0500)] 
libuuid: Make sure execl() variadic function is properly terminated

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoblkid: Add support for HFS+ detection
Theodore Ts'o [Sun, 27 Jan 2008 05:21:07 +0000 (00:21 -0500)] 
blkid: Add support for HFS+ detection

From SLES 10 patch: e2fsprogs-blkid_probe_hfsplus.patch

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoblkid: Make sure the blocksize in reiserfs is sane
Theodore Ts'o [Sun, 27 Jan 2008 05:14:01 +0000 (00:14 -0500)] 
blkid: Make sure the blocksize in reiserfs is sane

This avoids a floating point exception for corrupt reiserfs images

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoFix minor typo in resize2fs man page
Theodore Ts'o [Sun, 27 Jan 2008 05:08:49 +0000 (00:08 -0500)] 
Fix minor typo in resize2fs man page

Taken from SLES patch: e2fsprogs-1.39-resize2fs_manpage.patch

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoIgnore "safe" flag differences when e2fsck compares superblocks
Theodore Ts'o [Sun, 27 Jan 2008 04:17:50 +0000 (23:17 -0500)] 
Ignore "safe" flag differences when e2fsck compares superblocks

Recent e2fsprogs (1.40.3 and higher) fsck compares primary superblock to
backups, and if things differ, it forces a full check.  However, the
kernel has a penchant for updating flags the first time a feature is
used - attributes, large files, etc.

This is a bad idea, and we should break the kernel of this habit,
especially for the ext4 feature flags.  But for now, let's make e2fsck
avoid forcing a full check and backup except when absolutely
necessary.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoTeach the blkid library about ext4/ext4dev
Theodore Ts'o [Sun, 27 Jan 2008 03:25:50 +0000 (22:25 -0500)] 
Teach the blkid library about ext4/ext4dev

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoAdd support for the test_fs flag
Theodore Ts'o [Sun, 27 Jan 2008 00:06:35 +0000 (19:06 -0500)] 
Add support for the test_fs flag

The test_fs flag is an "ok to be used with test kernel code" flag.  It
makes it easier for us to determine whether a filesystem should be
mounted using ext4 or not.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoUpdate Swedish translation file from the Translation Project
Theodore Ts'o [Mon, 21 Jan 2008 19:01:52 +0000 (14:01 -0500)] 
Update Swedish translation file from the Translation Project

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoExplicitly check for ftruncate64() in configure.in
Theodore Ts'o [Mon, 21 Jan 2008 18:45:00 +0000 (13:45 -0500)] 
Explicitly check for ftruncate64() in configure.in

Apparently Mac OS 10.5 defines fstat64(), but not ftruncate64(),
causing resize2fs to fail to build.  So check explicitly for
ftruncate64(), and fall back to ftruncate() if necessary.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoresize2fs: Add sanity check for off_t overflow before truncating
Theodore Ts'o [Mon, 21 Jan 2008 18:43:18 +0000 (13:43 -0500)] 
resize2fs: Add sanity check for off_t overflow before truncating

If we can't use ftruncate64(), and have to use ftruncate() instead,
make sure that we don't accidentally truncate the size when we chop it
down to an off_t before calling ftruncate(), lest we severely damage a
filesystem image file.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoDefine helper functions ext2fs_set_i_{u,g}id_high() for MacOS compatibility
Theodore Ts'o [Mon, 21 Jan 2008 14:45:25 +0000 (09:45 -0500)] 
Define helper functions ext2fs_set_i_{u,g}id_high() for MacOS compatibility

This is needed for all non-Linux/Hurd/Masix systems...

Addresses-Sourceforge-Bug: #1863819

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoFix up e2fsprogs.spec file to include a new uuidd package
Eric Sandeen [Sat, 19 Jan 2008 23:13:32 +0000 (18:13 -0500)] 
Fix up e2fsprogs.spec file to include a new uuidd package

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoFix the pathname of /var/lib/uuidd/uuidd.pid in uuidd man page.
Eric Sandeen [Sat, 19 Jan 2008 14:16:03 +0000 (09:16 -0500)] 
Fix the pathname of /var/lib/uuidd/uuidd.pid in uuidd man page.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agodebian: Add passwd dependency to libuuid1 and uuid-runtime
Theodore Ts'o [Mon, 14 Jan 2008 15:40:32 +0000 (10:40 -0500)] 
debian: Add passwd dependency to libuuid1 and uuid-runtime

The groupadd and useradd commands come from passwd, which is not
Essential: yes, so a Depends is needed.

Addresses-Debian-Bug: #459403

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agodebian: Add "set -e" to postinst scripts
Theodore Ts'o [Mon, 14 Jan 2008 15:38:09 +0000 (10:38 -0500)] 
debian: Add "set -e" to postinst scripts

This ensures that if there is some failure in adding the uid/gid, the
package installation will abort.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoblkid: have ntfs's UUID compatible with vol_id
Pixel [Fri, 11 Jan 2008 10:41:15 +0000 (11:41 +0100)] 
blkid: have ntfs's UUID compatible with vol_id

Ensure the length of the UUID is always the same

without the patch:

% blkid /tmp/a /tmp/b
/tmp/a: UUID="7130E4771519577F" TYPE="ntfs"
/tmp/b: UUID="7E9B4A7CCE99CA" TYPE="ntfs"

with the patch:

% blkid /tmp/a /tmp/b
/tmp/a: UUID="7130E4771519577F" TYPE="ntfs"
/tmp/b: UUID="007E9B4A7CCE99CA" TYPE="ntfs"

ie same as:

% vol_id --uuid /tmp/a ; vol_id --uuid /tmp/b
7130E4771519577F
007E9B4A7CCE99CA

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoIf --sbindir, et. al are specified to configure set $root_sbindir, et al.
Theodore Ts'o [Fri, 4 Jan 2008 21:55:37 +0000 (16:55 -0500)] 
If --sbindir, et. al are specified to configure set $root_sbindir, et al.

If the user specifies as arguments to configure --bindir, --sbindir,
--libdir, or --sysconfdir, then set corresponding $root_FOO variable,
so that the request from the user to set a specific --sbindir is
honored.

Addresses-Sourceforge-Bug: 498381

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoAdd sample python bindings for the uuid library
Theodore Ts'o [Thu, 3 Jan 2008 20:39:19 +0000 (15:39 -0500)] 
Add sample python bindings for the uuid library

Pretty trivial, but maybe useful to someone.

Originially submited by Ondrej Sury <ondrej@sury.org>

Addresses-Sourceforge-Patches: #778817

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agodebugfs: Change lsdel to use ext2fs_block_iterate2 it can find large files
Theodore Ts'o [Thu, 3 Jan 2008 19:38:49 +0000 (14:38 -0500)] 
debugfs: Change lsdel to use ext2fs_block_iterate2 it can find large files

Addresses-Sourceforge-Feature-Request: #1257500
Addresses-Sourceforge-Support-Request: #1253511

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoUse pkg-config to determine where to find the devmapper library
Theodore Ts'o [Wed, 2 Jan 2008 01:05:04 +0000 (20:05 -0500)] 
Use pkg-config to determine where to find the devmapper library

Fedora and Red Hat puts the devmapper library in different locations
compared to Debian, so we use pkg-config.  Unfortunately Debian's
devmapper.pc file is buggy (See Debian Bug #390243), so we have to
work around it.

Historically, e2fsprogs has tried not to depend on pkg-config, since
its answers are so often **wrong** (the Debian bug has been ignored
for over a year), so I'm hoping I'm not going to regret this.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoFix Makefile race so that "make -j3 distclean" works correctly
Theodore Ts'o [Tue, 1 Jan 2008 22:00:39 +0000 (17:00 -0500)] 
Fix Makefile race so that "make -j3 distclean" works correctly

With this fix, "dpkg-buildpackage -j3" should work w/o problems for
the e2fsprogs package.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoFix profile, checker, and shared-library building on non-Linux platforms
Theodore Ts'o [Tue, 1 Jan 2008 21:48:09 +0000 (16:48 -0500)] 
Fix profile, checker, and shared-library building on non-Linux platforms

Approximately two years ago a revamp of the e2fsprogs build
infrastructure broke the Makefile fragments for building BSD, Solaris,
and Darwin shared libraries, as well as profiling and checker
libraries.  Apparently no one had noticed except for
pierre42@users.sourceforge.net.

Addresses-Sourceforge-Bug: #1819034

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agodebian: use '$(MAKE)' instead of 'make' in debian/rules
Theodore Ts'o [Tue, 1 Jan 2008 21:23:38 +0000 (16:23 -0500)] 
debian: use '$(MAKE)' instead of 'make' in debian/rules

This change allows a parallel build (i.e., via dpkg-buildpackage -j3)
of e2fsprogs to work correctly.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoAdd the Meta directory to the .gitignore file
Theodore Ts'o [Tue, 1 Jan 2008 20:55:51 +0000 (15:55 -0500)] 
Add the Meta directory to the .gitignore file

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoFix build failure on non-Linux/non-Hurd/non-Masix systems
Theodore Ts'o [Tue, 1 Jan 2008 17:25:36 +0000 (12:25 -0500)] 
Fix build failure on non-Linux/non-Hurd/non-Masix systems

The previous fix didn't quite work, but this one should!

Addresses-Sourceforge-Bug: #1861633

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agodebugfs: allow the undel command reallocate without linking the inode
Theodore Ts'o [Tue, 1 Jan 2008 16:37:20 +0000 (11:37 -0500)] 
debugfs: allow the undel command reallocate without linking the inode

When recovering a large number of deleted files, linking the undeleted
inodes to directories may require a directory to be expanded.  This
could allocate a block that that had been used by one of the
yet-to-be-undeleted files.  So the 'undel' command been enhanced to
allow the destination pathname to be optional.  This will allow the
cautious user to undelete all of the inodes without specifying a
destination pathname, and then either use debugfs's link command to
add hard links, or use e2fsck to link all of the recovered files to
the lost+found directory.

Addresses-Sourceforge-Feature-Request: #967141

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoe2fsck: When optimizing non-htree directories, sort by inode number
Theodore Ts'o [Tue, 1 Jan 2008 15:59:57 +0000 (10:59 -0500)] 
e2fsck: When optimizing non-htree directories, sort by inode number

Previously "e2fsck -fD" on a non-htree directory would sort the
directory alphabetically by name.  That's stupid.  Better to sort the
directory by inode number, since that will optimize performance much
more significantly than sorting by name!

Addresses-Sourceforge-Feature-Request: #532439

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoe2image: If there is an error while writing a block, call exit(1)
Theodore Ts'o [Tue, 1 Jan 2008 15:42:41 +0000 (10:42 -0500)] 
e2image: If there is an error while writing a block, call exit(1)

If the disk fills while e2image is writing its output file, it will
spew a large number of error messages instead of exiting with a
non-zero status code after the first failure.

Addresses-Sourceforge-Feature-Request: #606508

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agodebugfs: Add #include <string.h> to pick up prototype for strcasecmp
Theodore Ts'o [Tue, 1 Jan 2008 15:27:38 +0000 (10:27 -0500)] 
debugfs: Add #include <string.h> to pick up prototype for strcasecmp

Addresses-Sourceforge-Patch: #1861659

Reported-by: Mike Frysinger <vapier@users.sourceforge.net>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agouuidd: Add _GNU_SOURCE #define to pick up setres[ug]id() prototypes
Theodore Ts'o [Tue, 1 Jan 2008 14:16:16 +0000 (09:16 -0500)] 
uuidd: Add _GNU_SOURCE #define to pick up setres[ug]id() prototypes

Addresses-Sourceforge-Patch: #1861663

Reported-by: Mike Frysinger <vapier@users.sourceforge.net>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agodebian: Fix all postinst/prerm/postrm scripts to include debhelper additions
Theodore Ts'o [Tue, 1 Jan 2008 07:20:07 +0000 (02:20 -0500)] 
debian: Fix all postinst/prerm/postrm scripts to include debhelper additions

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agolibss: Remove unnecessary Makefile dependency for test_ss
Theodore Ts'o [Tue, 1 Jan 2008 06:19:19 +0000 (01:19 -0500)] 
libss: Remove unnecessary Makefile dependency for test_ss

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoUpdate release notes, version files for 1.40.4 release v1.40.4
Theodore Ts'o [Sat, 29 Dec 2007 15:19:33 +0000 (10:19 -0500)] 
Update release notes, version files for 1.40.4 release

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoExpand discussion of the -D option in e2fsck's man page
Theodore Ts'o [Tue, 1 Jan 2008 05:17:57 +0000 (00:17 -0500)] 
Expand discussion of the -D option in e2fsck's man page

Add an explanation of how e2fsck might decide to optimize a few
directories even without the -D option being specified.

Addresses-Debian-Bug: #441872

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agodebian: Fix the document ID in comerr_dev.doc-base
Theodore Ts'o [Tue, 1 Jan 2008 04:35:10 +0000 (23:35 -0500)] 
debian: Fix the document ID in comerr_dev.doc-base

The old document ID, com_err, used an illegal character ('_'); change
it to be comerr-manual to be conformant with the doc-base requirements.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoUpdate dependencies in lib/uuid/Makefile.in
Theodore Ts'o [Tue, 1 Jan 2008 04:12:35 +0000 (23:12 -0500)] 
Update dependencies in lib/uuid/Makefile.in

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agodebian: Use useradd and groupadd in favor of adduser
Theodore Ts'o [Tue, 1 Jan 2008 03:22:46 +0000 (22:22 -0500)] 
debian: Use useradd and groupadd in favor of adduser

The adduser package is 'important', and while it is often installed,
we can't guarantee that it will always be there.  A required package,
or a package which is dragged in by a required package, such as
libuuid1, shouldn't depend on an 'important' package since that would
implicitly make it be required, which shouldn't be done unless
absolutely necesary.

So we replace the call to adduser with the lower-level useradd and
groupadd programs.  They are part of the passwd package, which is
required to be on all Debian systems.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agodebian: build the e2fsck-static package so it works on 2.4 kernels
Theodore Ts'o [Mon, 31 Dec 2007 22:17:39 +0000 (17:17 -0500)] 
debian: build the e2fsck-static package so it works on 2.4 kernels

Some people are still running ancient Debian distributions, such as
woody, with a 2.4 kernel, and they want to be able to use the
e2fsck-static package on backlevel systems.

It turns out that we can't just statically link against glibc anymore,
since glibc now uses thread-local storage everywhere.  So we now build
e2fsck-static using dietlibc.

Addresses-Debian-Bug: #458017

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoFix build error in blkid/tst_types.c when using diet libc
Theodore Ts'o [Mon, 31 Dec 2007 19:43:11 +0000 (14:43 -0500)] 
Fix build error in blkid/tst_types.c when using diet libc

When compiling with diet libc, <sys/types.h> must be included in order
to define the types used in asm/types.h.  Strange choice, but
workable.  This doesn't cause much problems for e2fsprogs except
blkid/tst_types.h, which needed a #include of <sys/types.h>.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoTest for sys/syscall.h in configure to fix dietlibc build problem
Theodore Ts'o [Mon, 31 Dec 2007 19:36:48 +0000 (14:36 -0500)] 
Test for sys/syscall.h in configure to fix dietlibc build problem

When compiling with dietlibc, sys/syscall.h isn't supported; as of
dietlibc 0.30, it exists but it references a non-existent asm/unistd.h
header file.  So we have to test for its existence and avoid using it
in lib/uuid/gen_uuid.c if it is not supported.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agodebian: Do not use TLS or uuidd when building the bootfloppy udeb's
Theodore Ts'o [Mon, 31 Dec 2007 16:20:01 +0000 (11:20 -0500)] 
debian: Do not use TLS or uuidd when building the bootfloppy udeb's

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoAdd --disable-uuidd configure option
Theodore Ts'o [Mon, 31 Dec 2007 16:16:56 +0000 (11:16 -0500)] 
Add --disable-uuidd configure option

Add a configure option which causes the uuidd helper daemon not to be
built or used by the uuid library.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoAdd --disable-tls configure option
Theodore Ts'o [Mon, 31 Dec 2007 15:45:01 +0000 (10:45 -0500)] 
Add --disable-tls configure option

Add option to forcibly disable the use of thread local storage

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoFix build failure on non-Linux/non-Hurd/non-Masix systems
Theodore Ts'o [Sun, 30 Dec 2007 16:05:39 +0000 (11:05 -0500)] 
Fix build failure on non-Linux/non-Hurd/non-Masix systems

inode_uid() and inode_gid() weren't getting defined on systems that
were not Linux, Hurd, or Masix.

Addresses-Sourceforge-Bug: #1859778

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoConvert use of ext2fs_get_mem to ext2fs_get_array for overflow detection
Theodore Ts'o [Thu, 27 Dec 2007 15:08:13 +0000 (10:08 -0500)] 
Convert use of ext2fs_get_mem to ext2fs_get_array for overflow detection

Add some additional checks, primarily in resize2fs and in the rarely
used (and soon to-be-deprecated) e2fsck byte-swap filesystem function.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoUpdate Vietnamese translation from the Translation Project
Theodore Ts'o [Tue, 25 Dec 2007 19:22:47 +0000 (14:22 -0500)] 
Update Vietnamese translation from the Translation Project

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agouuidd: Avoid race conditions to that only one uuidd is started
Theodore Ts'o [Tue, 25 Dec 2007 19:19:15 +0000 (14:19 -0500)] 
uuidd: Avoid race conditions to that only one uuidd is started

Use an improved locking protocol based on the pid file to assure that
only one uuidd is started.  Apparently the kernel does not prevent
multiple processes from racing to bind to a Unix domain socket.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agolibuuid: Fix bug which caused uuidd to fail if sizeof(int) != sizeof(int *)
Theodore Ts'o [Fri, 21 Dec 2007 16:32:48 +0000 (11:32 -0500)] 
libuuid: Fix bug which caused uuidd to fail if sizeof(int) != sizeof(int *)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoAdd #define needed for Hurd ioctl definitions
Theodore Ts'o [Tue, 18 Dec 2007 04:03:53 +0000 (23:03 -0500)] 
Add #define needed for Hurd ioctl definitions

Addresses-Debian-Bug: #437720

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