Whamcloud - gitweb
tools/e2fsprogs.git
17 years agoUpdate Debian packaging for 1.39+1.40-WIP-2006.10.02+dfsg-1
Theodore Ts'o [Wed, 4 Oct 2006 13:12:35 +0000 (09:12 -0400)]
Update Debian packaging for 1.39+1.40-WIP-2006.10.02+dfsg-1

Remove I-D because of DFSG license Nazi's.

Make e2fsck and uuid-dev have its own /usr/share/doc directories, and make
the e2fsck-static package not depend on the e2fsprogs package.

Addresses Debian Bug: #383521

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoFix interpretation of the last_block command-line parameter to badblocks
Theodore Ts'o [Wed, 4 Oct 2006 03:35:57 +0000 (23:35 -0400)]
Fix interpretation of the last_block command-line parameter to badblocks

Also update the display messages so they are accurate.

Addresses Debian Bug: #386475

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoUpdate version.h, RELEASE-NOTES, debian/changelog for 1.40-WIP release
Theodore Ts'o [Mon, 2 Oct 2006 17:34:48 +0000 (13:34 -0400)]
Update version.h, RELEASE-NOTES, debian/changelog for 1.40-WIP release

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoRemove useful UUID specification from Debian packaging thanks to license Nazi's
Theodore Ts'o [Mon, 2 Oct 2006 17:31:10 +0000 (13:31 -0400)]
Remove useful UUID specification from Debian packaging thanks to license Nazi's

Addresses Debian Bug: #390664

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoCheck for potential 64-bit overflow in ext2fs_get_device_size()
Eric Sandeen [Mon, 2 Oct 2006 13:30:41 +0000 (09:30 -0400)]
Check for potential 64-bit overflow in ext2fs_get_device_size()

Check for potential overflow for filesystems contained in regular files
where the filesystem image size is returned by stat64().

Signed-off-by: Eric Sandeen <esandeen@sandeen.net>
17 years agoMinor correction to e2fsck.conf man page
Theodore Ts'o [Mon, 2 Oct 2006 12:38:44 +0000 (08:38 -0400)]
Minor correction to e2fsck.conf man page

Addresses Debian Bug: #369761

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agodebian: Add versioned build-dep on texi2html
Theodore Ts'o [Mon, 2 Oct 2006 12:33:29 +0000 (08:33 -0400)]
debian: Add versioned build-dep on texi2html

Addresses Debian Bug: #389554

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoIncrease default journal size to guarantee working on-line resizing
Theodore Ts'o [Mon, 2 Oct 2006 12:31:54 +0000 (08:31 -0400)]
Increase default journal size to guarantee working on-line resizing

Make the smallest journal be 1400 blocks instead of 1024 blocks to
make sure there is enough room to support on-line resizing.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoFix resize2fs error msgs if the fs or kernel doesn't support on-line resize
Theodore Ts'o [Mon, 2 Oct 2006 12:30:34 +0000 (08:30 -0400)]
Fix resize2fs error msgs if the fs or kernel doesn't support on-line resize

Check to make sure the filesystem has a resize inode if it is needed to
grow the filesystem.  Print the correct error message if the kernel
returns an ENOTTY error to the group extend ioctl

Addresses Debian Bug: #380548

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoFix Debian FTBFS problem caused by devmapper library using pthreads
Theodore Ts'o [Mon, 2 Oct 2006 02:18:08 +0000 (22:18 -0400)]
Fix Debian FTBFS problem caused by devmapper library using pthreads

Addresses Debian bug: #388718

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoFix build problem if byte swapping has been disabled.
Theodore Ts'o [Mon, 2 Oct 2006 01:42:21 +0000 (21:42 -0400)]
Fix build problem if byte swapping has been disabled.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoFix misc/Makefile.in so that it builds even if e2fsck hasn't been built yet
Theodore Ts'o [Mon, 2 Oct 2006 01:14:37 +0000 (21:14 -0400)]
Fix misc/Makefile.in so that it builds even if e2fsck hasn't been built yet

Addresses Sourceforge Bug: #1565561

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoFix e2p_percent() crash if percentage was zero.
Theodore Ts'o [Fri, 29 Sep 2006 14:23:16 +0000 (10:23 -0400)]
Fix e2p_percent() crash if percentage was zero.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoClarify copyright license status of lib/et and lib/ss in the COPYING file
Theodore Ts'o [Fri, 29 Sep 2006 14:21:43 +0000 (10:21 -0400)]
Clarify copyright license status of lib/et and lib/ss in the COPYING file

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoblkid_devno_to_devname(): Avoid recursive loops due to symlinks in /dev
Theodore Ts'o [Mon, 25 Sep 2006 02:33:38 +0000 (22:33 -0400)]
blkid_devno_to_devname(): Avoid recursive loops due to symlinks in /dev

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoFix blkid bug with correctly reporting FAT filesystem labels that are empty
Karel Zak [Mon, 18 Sep 2006 01:23:46 +0000 (21:23 -0400)]
Fix blkid bug with correctly reporting FAT filesystem labels that are empty

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agoAdd GFS/GFS2 support to the blkid library.
Karel Zak [Mon, 18 Sep 2006 01:10:58 +0000 (21:10 -0400)]
Add GFS/GFS2 support to the blkid library.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agoUpdate French and Dutch translations
Theodore Ts'o [Wed, 13 Sep 2006 20:43:55 +0000 (16:43 -0400)]
Update French and Dutch translations

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoFix more rounding overflows for filesystems that have 2**32-1 blocks
Eric Sandeen [Tue, 12 Sep 2006 18:56:18 +0000 (14:56 -0400)]
Fix more rounding overflows for filesystems that have 2**32-1 blocks

Signed-off-by: Eric Sandeen <esandeen@redhat.com>
17 years agoAdd checks to make sure inode counts don't overflow a 32-bit value
Eric Sandeen [Tue, 12 Sep 2006 18:56:17 +0000 (14:56 -0400)]
Add checks to make sure inode counts don't overflow a 32-bit value

Signed-off-by: Eric Sandeen <esandeen@redhat.com>
17 years agoCreate new ext2fs library inlines: ext2fs_group_{first,last}_block()
Eric Sandeen [Tue, 12 Sep 2006 18:56:16 +0000 (14:56 -0400)]
Create new ext2fs library inlines: ext2fs_group_{first,last}_block()

Create new ext2fs library inline functions in order to calculate
the starting and ending blocks in a block group.

Signed-off-by: Eric Sandeen <esandeen@redhat.com>
17 years agoFix signed vs unsigned printf format strings for block and inode numbers
Eric Sandeen [Tue, 12 Sep 2006 18:56:15 +0000 (14:56 -0400)]
Fix signed vs unsigned printf format strings for block and inode numbers

There were still some %d's lurking when we print blocks & inodes; also
many of the counters in the e2fsck_struct were signed, and probably
need to be unsigned to avoid overflows.

Signed-off-by: Eric Sandeen <esandeen@redhat.com>
17 years agoRemove unused variables
Eric Sandeen [Tue, 12 Sep 2006 18:56:12 +0000 (14:56 -0400)]
Remove unused variables

Signed-off-by: Eric Sandeen <esandeen@redhat.com>
17 years agoFix loops over group descriptors to prevent 2**32-1 block number overflows
Eric Sandeen [Tue, 12 Sep 2006 18:55:22 +0000 (14:55 -0400)]
Fix loops over group descriptors to prevent 2**32-1 block number overflows

For loops iterating over all group descriptors, consistently define
first_block and last_block in a way that they are inclusive of the
range, and do not overflow.

Previously on the last block group we did a test of <= first +
dec_blocks; this would actually wrap back to 0 for a total block count
of 2^32-1

Also add handling of last block group which may be smaller.

Signed-off-by: Eric Sandeen <esandeen@redhat.com>
17 years agoMinor man page updates to tune2fs(8) and uuidgen(1)
Theodore Ts'o [Tue, 12 Sep 2006 06:33:08 +0000 (02:33 -0400)]
Minor man page updates to tune2fs(8) and uuidgen(1)

Addresses Debian Bug: #373004

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoFixed RPM spec file to use the License tag instead of Copyright
Theodore Ts'o [Tue, 12 Sep 2006 05:43:42 +0000 (01:43 -0400)]
Fixed RPM spec file to use the License tag instead of Copyright

Also explicitly specify the license as GPLv2.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoFix bug in device mapper scanning; probe_one() doesn't want a leading /dev
Theodore Ts'o [Tue, 12 Sep 2006 05:30:53 +0000 (01:30 -0400)]
Fix bug in device mapper scanning; probe_one() doesn't want a leading /dev

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoRemove duplicate entry in the RPM .spec file.
Theodore Ts'o [Mon, 11 Sep 2006 05:14:53 +0000 (01:14 -0400)]
Remove duplicate entry in the RPM .spec file.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoFix potential 2**32-1 overflow by using e2p_percent()
Theodore Ts'o [Wed, 30 Aug 2006 07:08:13 +0000 (03:08 -0400)]
Fix potential 2**32-1 overflow by using e2p_percent()

Add a new functiom, e2p_percent(), which correct calculates the percentage
of a number based on a given percentage, without worrying about overflow
issues.  This is used where we calculate the number of reserved blocks using
a percentage of the total number of blocks in a filesystem.

Based on patches from Eric Sandeen, but generalized to use this new function.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Eric Sandeen <esandeen@redhat.com>
17 years agoDetect overflows in loop counters
Eric Sandeen [Wed, 30 Aug 2006 06:16:55 +0000 (02:16 -0400)]
Detect overflows in loop counters

For loops such as:

for (i=1; i <= fs->super->s_blocks_count; i++) {
        <do_stuff>
}

if i is an int and s_blocks_count is (2^32-1), the condition is never false.
Change these loops to:

for (i=1; i <= fs->super->s_blocks_count && i > 0; i++) {
        <do_stuff>
}

to stop the loop when we overflow i

Signed-off-by: Eric Sandeen <esandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoRemove unnecessary and unused resize2fs build rule from misc/Makefile.in
Theodore Ts'o [Wed, 30 Aug 2006 06:06:41 +0000 (02:06 -0400)]
Remove unnecessary and unused resize2fs build rule from misc/Makefile.in

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoFix potential 2**32-1 overflow problems by ext2fs_div_ceil()
Theodore Ts'o [Wed, 30 Aug 2006 05:57:00 +0000 (01:57 -0400)]
Fix potential 2**32-1 overflow problems by ext2fs_div_ceil()

Add a new function, ext2fs_div_ceil(), which correctly calculates a division
of two unsigned integer where the result is always rounded up the next
largest integer.   This is used everywhere where we might have
previously caused an overflow when the number of blocks
or inodes is too close to 2**32-1.

Based on patches from Eric Sandeen, but generalized to use this new function

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Eric Sandeen <esandeen@redhat.com>
17 years agoFix silly spelling error in e2fsck
Theodore Ts'o [Tue, 29 Aug 2006 21:12:18 +0000 (17:12 -0400)]
Fix silly spelling error in e2fsck

Addresses SourceForge bug: #1531372

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoFix debugfs coredump when lsdel is run without an open filesystem
Theodore Ts'o [Tue, 29 Aug 2006 21:02:56 +0000 (17:02 -0400)]
Fix debugfs coredump when lsdel is run without an open filesystem

Addresses Debian Bug: #378335

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoAdd Vietnamese translation
Theodore Ts'o [Sun, 20 Aug 2006 01:16:17 +0000 (21:16 -0400)]
Add Vietnamese translation

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoblkid.8.in: Fix description of the -l option to be more accurate
Andreas Dilger [Sun, 20 Aug 2006 01:12:15 +0000 (21:12 -0400)]
blkid.8.in: Fix description of the -l option to be more accurate

This patch fixes the blkid.8.in description of the "-l" option.  The man
page gives the impression that the first match is the one that is returned.
However, the blkid_find_dev_with_tag() function returns the device with
the highest priority (which is good, because that is what people really want).

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
17 years agoThis patch fixes up an error in the lib/blkid/Makefile.in which was causing
Andreas Dilger [Sun, 20 Aug 2006 00:05:28 +0000 (20:05 -0400)]
This patch fixes up an error in the lib/blkid/Makefile.in which was causing
all lib/blkid/tst* files to be removed with "make clean", in particular
tst_types.c.  That was causing a failure of "make check" in an RPM source
tree.  Fix is to explicitly list the test binaries, as lib/ext2fs/Makefile.in
does.

As "make check" was only calling test_probe and tst_types (and none
of the other tst_* tests) it was not clear what was going on, and an
"hg update" would always return the old tst_types.c file back so the
problem was only being seen intermittently...  It isn't clear whether
you want the other tst_* programs to be run as part of "make check".

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
17 years agoIf diff -u is supported, use it to report test failures.
Theodore Ts'o [Sun, 6 Aug 2006 18:33:13 +0000 (14:33 -0400)]
If diff -u is supported, use it to report test failures.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoAdd 64-bit byte swapping functions
Andreas Dilger [Sun, 6 Aug 2006 05:39:30 +0000 (01:39 -0400)]
Add 64-bit byte swapping functions

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
17 years agoMake the findsuper program more powerful
Andreas Dilger [Sun, 6 Aug 2006 04:56:37 +0000 (00:56 -0400)]
Make the findsuper program more powerful

Improve the findsuper program by printing the uuid and label from the
superblocks, as well as the starting and ending offsets of the
filesystem given the information in the superblock.  Omit by
default printing superblocks that are likely found in located in an ext3
journal unless an explicit -j option is given.

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoRequire mke2fs -F -F for really dangerous operations
Andreas Dilger [Sat, 5 Aug 2006 23:05:53 +0000 (19:05 -0400)]
Require mke2fs -F -F for really dangerous operations

Disambiguate the use of "-F" (force) flag for mke2fs to avoid dangerous
situations.  The use of -F is needed for regular backing files and
for filesystems on whole block devices.  It should NOT be confused
with mke2fs on an apparently-mounted or in-use filesystem.

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoRename EXT3_EXTENTS_FL to EXT4_EXTENTS_FL and make it visible to the user
Andreas Dilger [Sat, 5 Aug 2006 22:50:22 +0000 (18:50 -0400)]
Rename EXT3_EXTENTS_FL to EXT4_EXTENTS_FL and make it visible to the user

lsattr will display the EXT4_EXTENTS_FL flag

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoCreate the generated files read-only to remind developers not to edit them.
Andreas Dilger [Sat, 5 Aug 2006 18:41:00 +0000 (14:41 -0400)]
Create the generated files read-only to remind developers not to edit them.

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoAllow default inode_size to be specified in mke2fs.conf and document mke2fs -I
Andreas Dilger [Sun, 16 Jul 2006 02:08:20 +0000 (22:08 -0400)]
Allow default inode_size to be specified in mke2fs.conf and document mke2fs -I

This patch allows "inode_size" to be specified in the mke2fs.conf file,
and always compiles in the "-I" option.  In addition, it disallows
specifying the inode size on rev 0 filesystems, though I don't think
this was much of a danger anyways.

Clean up dead lines in ext2fs.h.

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoFix spelling typo in chattr(1) man page
Theodore Ts'o [Sun, 16 Jul 2006 01:55:33 +0000 (21:55 -0400)]
Fix spelling typo in chattr(1) man page

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoProtect ext2_ext_attr.h from multiple inclusion
Andreas Dilger [Wed, 28 Jun 2006 15:29:56 +0000 (11:29 -0400)]
Protect ext2_ext_attr.h from multiple inclusion

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
17 years agoMinor fix to prevent e2fsck.h being included twice:
Andreas Dilger [Wed, 28 Jun 2006 15:26:42 +0000 (11:26 -0400)]
Minor fix to prevent e2fsck.h being included twice:

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
17 years agoadd "make rpm" target to top-level Makefile
Andreas Dilger [Wed, 21 Jun 2006 04:05:49 +0000 (00:05 -0400)]
add "make rpm" target to top-level Makefile

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
17 years agofix comment for blkid_get_dev_size()
Andreas Dilger [Wed, 21 Jun 2006 04:04:08 +0000 (00:04 -0400)]
fix comment for blkid_get_dev_size()

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
17 years agodebugfs "stat" should print unsigned values for xattrs
Andreas Dilger [Wed, 21 Jun 2006 04:01:42 +0000 (00:01 -0400)]
debugfs "stat" should print unsigned values for xattrs

This patch changes debugfs to print unsigned chars when "stat" on an inode
finds xattrs in the inode.  Without this change, the values are printed
as signed chars, e.g. "ffffffec" instead of "ec".

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
17 years agoExclude mercurial files from the RPM build tree to speed up copy/build.
Andreas Dilger [Wed, 21 Jun 2006 03:59:43 +0000 (23:59 -0400)]
Exclude mercurial files from the RPM build tree to speed up copy/build.

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
17 years agoInstall mke2fs.conf into root_sysconfdir rather than /etc.
Matthias Andree [Mon, 12 Jun 2006 11:54:16 +0000 (13:54 +0200)]
Install mke2fs.conf into root_sysconfdir rather than /etc.

17 years agoRead mke2fs.conf and e2fsck.conf from root_sysconfdir rather than harcoded /etc.
Matthias Andree [Sat, 10 Jun 2006 14:08:18 +0000 (16:08 +0200)]
Read mke2fs.conf and e2fsck.conf from root_sysconfdir rather than harcoded /etc.

18 years agoAdd parentheses and casts to make GCC happy.
Matthias Andree [Tue, 30 May 2006 14:29:49 +0000 (16:29 +0200)]
Add parentheses and casts to make GCC happy.

Signed-off-by: Matthias Andree <matthias.andree@gmx.de>
18 years agoAdd prototype for e2fsck_write_inode_full.
Matthias Andree [Tue, 30 May 2006 14:29:15 +0000 (16:29 +0200)]
Add prototype for e2fsck_write_inode_full.

Signed-off-by: Matthias Andree <matthias.andree@gmx.de>
18 years agoAdd missing #include <ctype.h>.
Matthias Andree [Tue, 30 May 2006 14:28:42 +0000 (16:28 +0200)]
Add missing #include <ctype.h>.

Signed-off-by: Matthias Andree <matthias.andree@gmx.de>
18 years agoFix non-Linux compiler warning (missing return statement).
Matthias Andree [Tue, 30 May 2006 14:28:22 +0000 (16:28 +0200)]
Fix non-Linux compiler warning (missing return statement).

Signed-off-by: Matthias Andree <matthias.andree@gmx.de>
18 years agoDeclare getopt() according to POSIX 2001 if getopt.h not found.
Matthias Andree [Tue, 30 May 2006 14:27:45 +0000 (16:27 +0200)]
Declare getopt() according to POSIX 2001 if getopt.h not found.

Signed-off-by: Matthias Andree <matthias.andree@gmx.de>
18 years agoFix printf types (FreeBSD has u_long for ntohl).
Matthias Andree [Tue, 30 May 2006 14:26:29 +0000 (16:26 +0200)]
Fix printf types (FreeBSD has u_long for ntohl).

Signed-off-by: Matthias Andree <matthias.andree@gmx.de>
18 years agoFix SIGBUS through unaligned access to FAT superblocks.
Matthias Andree [Tue, 30 May 2006 13:47:12 +0000 (15:47 +0200)]
Fix SIGBUS through unaligned access to FAT superblocks.

SPARCs do not like unaligned halfword access and throw SIGBUS.
Read data "manually" instead.

Tested on Solaris 8/SPARC with gcc 2.95.3.

Signed-off-by: Matthias Andree <matthias.andree@gmx.de>
18 years agoChange more "echo -n" to "printf" to avoid screen clutter.
Matthias Andree [Tue, 30 May 2006 13:47:05 +0000 (15:47 +0200)]
Change more "echo -n" to "printf" to avoid screen clutter.

Signed-off-by: Matthias Andree <matthias.andree@gmx.de>
18 years agoSwitch endian detection from Linuxism to AC_C_BIGENDIAN.
Matthias Andree [Tue, 30 May 2006 12:42:47 +0000 (14:42 +0200)]
Switch endian detection from Linuxism to AC_C_BIGENDIAN.

This fixes all blkid test failures on FreeBSD 4.11 i386.

Signed-off-by: Matthias Andree <matthias.andree@gmx.de>
18 years agoRevise DIOCGDINFO (sys/disklabel.h) related FreeBSD comment.
Matthias Andree [Tue, 30 May 2006 03:08:02 +0000 (05:08 +0200)]
Revise DIOCGDINFO (sys/disklabel.h) related FreeBSD comment.

Signed-off-by: Matthias Andree <matthias.andree@gmx.de>
18 years agoEnable sys/disklabel.h and DIOCGDINFO based getsize code.
Matthias Andree [Tue, 30 May 2006 02:26:13 +0000 (04:26 +0200)]
Enable sys/disklabel.h and DIOCGDINFO based getsize code.

Tested on FreeBSD 4.11-RELEASE i386.

Signed-off-by: Matthias Andree <matthias.andree@gmx.de>
18 years agoAdd a bunch of type fixes for debug/"make check" code paths.
Matthias Andree [Mon, 29 May 2006 23:48:51 +0000 (01:48 +0200)]
Add a bunch of type fixes for debug/"make check" code paths.

Signed-off-by: Matthias Andree <matthias.andree@gmx.de>
18 years agoCast time_t variable to long for fprintf to match %ld.
Matthias Andree [Mon, 29 May 2006 23:20:46 +0000 (01:20 +0200)]
Cast time_t variable to long for fprintf to match %ld.

Signed-off-by: Matthias Andree <matthias.andree@gmx.de>
18 years agoDrop unused vector uuid[].
Matthias Andree [Mon, 29 May 2006 23:20:17 +0000 (01:20 +0200)]
Drop unused vector uuid[].

Signed-off-by: Matthias Andree <matthias.andree@gmx.de>
18 years agoImplement DIOCGMEDIASIZE for FreeBSD's GEOM.
Matthias Andree [Mon, 29 May 2006 22:54:49 +0000 (00:54 +0200)]
Implement DIOCGMEDIASIZE for FreeBSD's GEOM.

Try DIOCGMEDIASIZE ioctl() if defined, to obtain
the media size on FreeBSD 5.0 and newer.
The binary search fallback doesn't work, as FreeBSD
block devices are unbuffered and refuse reads below
the block size.

Signed-off-by: Matthias Andree <matthias.andree@gmx.de>
18 years agoAdded tag E2FSPROGS-1_39 for changeset 7c019255c28099336f7bba454b9307c4bdeb94a4 E2FSPROGS-1_39
Theodore Ts'o [Mon, 29 May 2006 15:47:49 +0000 (11:47 -0400)]
Added tag E2FSPROGS-1_39 for changeset 7c019255c28099336f7bba454b9307c4bdeb94a4

18 years agoUpdate release notes, version numbers, et. al. for 1.39 release
Theodore Ts'o [Mon, 29 May 2006 15:47:25 +0000 (11:47 -0400)]
Update release notes, version numbers, et. al. for 1.39 release

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoAdd missing backwards compatibility for ancient Linux systems
Theodore Ts'o [Mon, 29 May 2006 15:06:16 +0000 (11:06 -0400)]
Add missing backwards compatibility for ancient Linux systems

This fixes some (but not all) of the compatibility bugs which prevented
e2fsprogs from being compiled on a Linux 2.0.35 system.  There are still
some unprotected use of long long's, and apparently some type problems
with the uuid library, but these can be fixed up later.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoFix debugfs's dump_unsued commands on filesystems with a 64k blocksize
Theodore Ts'o [Mon, 29 May 2006 03:42:47 +0000 (23:42 -0400)]
Fix debugfs's dump_unsued commands on filesystems with a 64k blocksize

Use EXT2_MAX_BLOCK_SIZE instead of a hardcoded blocksize of 32768, since
this will fail on a filesystem with a 64k blocksize.  (Addresses SourceForge
bug #1424311)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoMake test scripts more robust against locale-related environment variables
Theodore Ts'o [Mon, 29 May 2006 03:41:23 +0000 (23:41 -0400)]
Make test scripts more robust against locale-related environment variables

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoClarify -T option of mke2fs in its man page
Theodore Ts'o [Mon, 29 May 2006 03:26:14 +0000 (23:26 -0400)]
Clarify -T option of mke2fs in its man page

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoUpdate tests to reflect updated mke2fs.conf file
Theodore Ts'o [Wed, 24 May 2006 17:07:41 +0000 (13:07 -0400)]
Update tests to reflect updated mke2fs.conf file

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoCreate new filesystems with hash trees and on-line resizing as the default.
Theodore Ts'o [Tue, 23 May 2006 02:15:18 +0000 (22:15 -0400)]
Create new filesystems with hash trees and on-line resizing as the default.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoFix spelling mistakes in e2fsck, mke2fs.conf, and resize2fs man pages
Theodore Ts'o [Mon, 22 May 2006 21:59:37 +0000 (17:59 -0400)]
Fix spelling mistakes in e2fsck, mke2fs.conf, and resize2fs man pages

Addresses Debian Bugs: #368392, #368393, #368394

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoFix typo that caused the Debian changelog to not be valid parseable English
Theodore Ts'o [Sun, 21 May 2006 23:36:56 +0000 (19:36 -0400)]
Fix typo that caused the Debian changelog to not be valid parseable English

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoClarify resize2fs man page and add reference to LVM
Theodore Ts'o [Sun, 21 May 2006 23:33:46 +0000 (19:33 -0400)]
Clarify resize2fs man page and add reference to LVM

Addresses Debian Bug: #368179

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoFix type warning problem with sizeof() in ext2fs_open2()
Theodore Ts'o [Sun, 21 May 2006 23:26:45 +0000 (19:26 -0400)]
Fix type warning problem with sizeof() in ext2fs_open2()

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoFix type warning problem with time_t in debugfs
Theodore Ts'o [Sun, 21 May 2006 23:26:06 +0000 (19:26 -0400)]
Fix type warning problem with time_t in debugfs

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoFix comerr-dev's pointer doc-base pointer to the top-level html file
Theodore Ts'o [Sun, 14 May 2006 22:11:18 +0000 (18:11 -0400)]
Fix comerr-dev's pointer doc-base pointer to the top-level html file

18 years agoMinor edits to tune2fs(8) man page
Theodore Ts'o [Sun, 14 May 2006 22:09:12 +0000 (18:09 -0400)]
Minor edits to tune2fs(8) man page

Clarify how the -c and -C options work

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoUpdate release notes for a Debian WIP release.
Theodore Ts'o [Sun, 14 May 2006 21:31:48 +0000 (17:31 -0400)]
Update release notes for a Debian WIP release.

18 years agoRemove needless sanity check in tune2fs's -i option.
Theodore Ts'o [Sun, 14 May 2006 21:30:51 +0000 (17:30 -0400)]
Remove needless sanity check in tune2fs's -i option.

We were complaining with a confusing error message if the user tried to specify
a check interval larger than a 365 days.  It's probably a bad idea if the user wants to
do this, but it's not worth it to complain.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoFixed signed vs. unsigned comparison warning in strncmp().
Theodore Ts'o [Sun, 14 May 2006 21:29:00 +0000 (17:29 -0400)]
Fixed signed vs. unsigned comparison warning in strncmp().

It's better to use memcmp() anyway given the code in question.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoFix memory leak in e2fsck's error paths
Theodore Ts'o [Sun, 14 May 2006 21:16:29 +0000 (17:16 -0400)]
Fix memory leak in e2fsck's error paths

Add missing brelse() calls to avoid memory leaks in error paths.  (Thanks
to Michael C. Thompson for pointing these out; they were originally
found using Coverity.)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoAdd RAID stride support to resize2fs
Theodore Ts'o [Sun, 14 May 2006 19:33:57 +0000 (15:33 -0400)]
Add RAID stride support to resize2fs

Resize2fs will now automatically determine the RAID stride parameter that
had been used to create the filesystem, and use that for newly created
block groups.   The RAID stride parameter may also be manually specified
on the command line using the new -S option to resize2fs.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoUpdate TODO to remove item which is already completed.
Theodore Ts'o [Sat, 13 May 2006 13:28:04 +0000 (09:28 -0400)]
Update TODO to remove item which is already completed.

18 years agoFix read/write badblocks testing in mke2fs and e2fsck
Theodore Ts'o [Sat, 13 May 2006 13:25:47 +0000 (09:25 -0400)]
Fix read/write badblocks testing in mke2fs and e2fsck

The exlcusive device safety check that was added inadvertently broke
e2fsck -cc and mke2fs -cc since e2fsck and mke2fs hold the device
in exclusive access when badblocks is run.  So we add a private option
to badblocks, -X, which is passed by e2fsck and mke2fs to badblocks
to indicate that it is OK to skip the EXT2_MF_BUSY checks.

Addresses Debian Bug: #366017

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoFix problem with creating initrd's for 2.4 systems on Debian
Theodore Ts'o [Sat, 13 May 2006 13:05:01 +0000 (09:05 -0400)]
Fix problem with creating initrd's for 2.4 systems on Debian

Recent glibc's no longer accept LD_ASSUME_KERNEL=2.4; this must be LD_ASSUME_KERNEL=2.4.1.   Also, only set LD_ASSUME_KERNEL if we
are not using a 2.4 kernel (and are presumably using something newer)

Addresses Debian Bug: #364516

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoChange mke2fs's layout of RAID-optimized filesystems to be more optimal
Theodore Ts'o [Sat, 13 May 2006 12:46:37 +0000 (08:46 -0400)]
Change mke2fs's layout of RAID-optimized filesystems to be more optimal

When allocating space for the RAID filesystems with the stride parameter,
place each portion of the group's inode table right up after the superblock
(if present) in order to minimize fragmentation of the freespace.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoAdd support for EXT2_FEATURE_COMPAT_LAZY_BG
Theodore Ts'o [Tue, 9 May 2006 00:17:26 +0000 (20:17 -0400)]
Add support for EXT2_FEATURE_COMPAT_LAZY_BG

This feature is initially intended for testing purposes; it allows an
ext2/ext3 developer to create very large filesystems using sparse files
where most of the block groups are not initialized and so do not require
much disk space.  Eventually it could be used as a way of speeding up
mke2fs and e2fsck for large filesystem, but that would be best done by
adding an RO_COMPAT extension to the filesystem to allow the inode table
to be lazily initialized on a per-block basis, instead of being entirely initialized
or entirely unused on a per-blockgroup basis.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoAdd handling for invalid option characters in debugfs subcommands
Theodore Ts'o [Fri, 28 Apr 2006 00:59:42 +0000 (20:59 -0400)]
Add handling for invalid option characters in debugfs subcommands

Fix the debugfs commands htree_dump, dx_hash, and list_dir so they print a
print a usage message when an illegal option character is given.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoSpeed up mke2fs and e2fsck by writing bitmaps more efficiently
Theodore Ts'o [Sun, 23 Apr 2006 16:43:40 +0000 (12:43 -0400)]
Speed up mke2fs and e2fsck by writing bitmaps more efficiently

Reduce disk seeks by writing the inode and block bitmaps in an interleaved fashion.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoFix filefrag to be 32-bit clean
Theodore Ts'o [Sat, 22 Apr 2006 08:49:09 +0000 (04:49 -0400)]
Fix filefrag to be 32-bit clean

Currently filefrag uses signed int for block numbers, thus it reporting
corrupted block number for a file on a more than 8TB ext3. The following
trivial patch replace the signed int type block number with "unsigned
long type.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoFix bug which could cause dumpe2fs to rarely fail to print a UUID
Theodore Ts'o [Sat, 22 Apr 2006 08:32:36 +0000 (04:32 -0400)]
Fix bug which could cause dumpe2fs to rarely fail to print a UUID

uuid.c (e2p_is_null_uuid): Fix really stupid bug which could cause dumpe2fs
to fail to display a the journal or hash seed UUID.  (Thanks to Guillaume
Chambraud for pointing this out.)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoAdded tag E2FSPROGS-1.39-WIP-0409 for changeset a89eec026fc32ca7da786fbe3f76d892b6badb23 E2FSPROGS-1.39-WIP-0409
Theodore Ts'o [Sat, 22 Apr 2006 08:29:41 +0000 (04:29 -0400)]
Added tag E2FSPROGS-1.39-WIP-0409 for changeset a89eec026fc32ca7da786fbe3f76d892b6badb23

18 years agoUpdate for e2fsprogs-1.39-WIP-0409 release
Theodore Ts'o [Sat, 22 Apr 2006 08:29:16 +0000 (04:29 -0400)]
Update for e2fsprogs-1.39-WIP-0409 release

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoUpdate config.guess and config.sub to latest version (2006-02-23) from FSF
Theodore Ts'o [Sun, 9 Apr 2006 22:37:22 +0000 (18:37 -0400)]
Update config.guess and config.sub to latest version (2006-02-23) from FSF

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