]> git.ipfire.org Git - thirdparty/e2fsprogs.git/log
thirdparty/e2fsprogs.git
16 years agoMerge basic FLEX_BG support
Theodore Ts'o [Sun, 4 Nov 2007 01:01:01 +0000 (21:01 -0400)] 
Merge basic FLEX_BG support

Merge commit 'c2d4300b8a4a13d8a78b86c386f76259f23feec2' into next

16 years agoEnable FLEX_BG feature support
Jose R. Santos [Tue, 14 Aug 2007 04:32:57 +0000 (23:32 -0500)] 
Enable FLEX_BG feature support

Add FLEX_BG as a supported feature bit.

Add support to mke2fs to create filesystems with FLEX_BG.

Add support to tune2fs to add (and remove, if it won't break
filesystem consistency) the FLEX_BG feature.

Signed-off-by: Jose R. Santos <jrs@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
--

 lib/e2p/feature.c   |    2 ++
 lib/ext2fs/ext2fs.h |    6 ++++--
 misc/mke2fs.c       |    7 ++++++-
 3 files changed, 12 insertions(+), 3 deletions(-)

16 years agoRelax group descriptor checking for FLEX_BG
Jose R. Santos [Tue, 14 Aug 2007 04:33:03 +0000 (23:33 -0500)] 
Relax group descriptor checking for FLEX_BG

The FLEX_BG feature allows the inode table, block bitmap, and inode
bitmaps to be located anywhere in the filesystem.  Update e2fsck and
libext2fs's checking code to recognize this.

Signed-off-by: Jose R. Santos <jrs@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
--

 e2fsck/super.c          |   14 ++++++++++++--
 lib/ext2fs/check_desc.c |   15 +++++++++++++--
 2 files changed, 25 insertions(+), 4 deletions(-)

16 years agolib/ext2fs/Makefile.in: Reorder some of the $(SRCS) in alphabetical order.
Jose R. Santos [Mon, 22 Oct 2007 02:03:14 +0000 (21:03 -0500)] 
lib/ext2fs/Makefile.in: Reorder some of the $(SRCS) in alphabetical order.

All files under $(OBJS) and $(SRCS) should be in alphabetical order
but this is not always the case.  Let fix some some of these before
applying new files to the list of $(SRCS).

Signed-off-by: Jose R. Santos <jrs@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
--

 lib/ext2fs/Makefile.in |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

16 years agoReserve the INCOMPAT feature number for FLEX_BG.
Jose R. Santos [Tue, 14 Aug 2007 04:32:51 +0000 (23:32 -0500)] 
Reserve the INCOMPAT feature number for FLEX_BG.

Signed-off-by: Jose R. Santos <jrs@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
--

 lib/ext2fs/ext2_fs.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

16 years agoMerge branch 'cl/remove-masix' into next
Theodore Ts'o [Thu, 1 Nov 2007 05:54:22 +0000 (01:54 -0400)] 
Merge branch 'cl/remove-masix' into next

16 years agomke2fs: remove masix support
Coly Li [Thu, 23 Aug 2007 07:09:03 +0000 (15:09 +0800)] 
mke2fs: remove masix support

This patch remove masix support from mke2fs.

Signed-off-by: Coly Li <coyli@suse.de>
16 years agoe2fsck: remove masix support
Coly Li [Thu, 23 Aug 2007 07:08:18 +0000 (15:08 +0800)] 
e2fsck: remove masix support

This patch remove masix support from e2fsck.

Signed-off-by: Coly Li <coyli@suse.de>
16 years agolibext2fs: remove masix support
Coly Li [Thu, 23 Aug 2007 07:08:30 +0000 (15:08 +0800)] 
libext2fs: remove masix support

This patch remove masix support from lib/ext2fs.

Signed-off-by: Coly Li <coyli@suse.de>
16 years agodocument: remove masix from data structure
Coly Li [Thu, 23 Aug 2007 07:08:35 +0000 (15:08 +0800)] 
document: remove masix from data structure

This patch remove masix union from data structure in ext2ed-design.sgml.

Signed-off-by: Coly Li <coyli@suse.de>
16 years agodebugfs: remove masix support
Coly Li [Thu, 23 Aug 2007 07:08:37 +0000 (15:08 +0800)] 
debugfs: remove masix support

This patch remove masix supporting from debugfs.

Singed-off-by: Coly Li <coyli@suse.de>
--

16 years agocheck_ea_in_inode: Cleanup e2fsck_write_inode_full() call
Dmitry V. Levin [Sat, 20 Oct 2007 18:10:26 +0000 (22:10 +0400)] 
check_ea_in_inode: Cleanup e2fsck_write_inode_full() call

Avoid pointer cast and call e2fsck_write_inode_full() the same way
as check_inode_extra_space() does.

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
16 years agoblkid.pc, ss.pc: Move private libs from "Libs:" to "Libs.private:"
Dmitry V. Levin [Sat, 20 Oct 2007 18:09:30 +0000 (22:09 +0400)] 
blkid.pc, ss.pc: Move private libs from "Libs:" to "Libs.private:"

According to pkg-config(1) manual page, private libraries should be
defined by "Libs.private:" line.  Private libraries are libraries which
are not exposed through our library, but are needed in the case of
static linking.

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
16 years agotexinfo: Fix directory entries
Dmitry V. Levin [Sat, 20 Oct 2007 18:09:13 +0000 (22:09 +0400)] 
texinfo: Fix directory entries

According to texinfo documentation, @dircategory and
@direntry...@end direntry commands are more appropriate.

For details see
http://www.gnu.org/software/texinfo/manual/texinfo/html_node/Installing-Dir-Entries.html

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
16 years agoblkid/test_probe.in: Fix temporary files handling
Dmitry V. Levin [Sat, 20 Oct 2007 18:08:51 +0000 (22:08 +0400)] 
blkid/test_probe.in: Fix temporary files handling

Avoid placing files with predictable names in /tmp.

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
16 years agoCheck fgets(3) return value
Dmitry V. Levin [Sat, 20 Oct 2007 18:08:40 +0000 (22:08 +0400)] 
Check fgets(3) return value

When fgets() function fails, contents of the buffer is undefined.  That
is, fgets() return value needs to be checked, to avoid undefined behavior.

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
16 years agoe2image: Fix potential off-by-one fs_device_name buffer overflow
Dmitry V. Levin [Sat, 20 Oct 2007 18:08:20 +0000 (22:08 +0400)] 
e2image: Fix potential off-by-one fs_device_name buffer overflow

In write_image_file(), fix length argument of strncat(3) call.

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
16 years agoMerge branch 'tt/badblocks-cleanup' into next
Theodore Ts'o [Mon, 22 Oct 2007 22:11:24 +0000 (18:11 -0400)] 
Merge branch 'tt/badblocks-cleanup' into next

16 years agobadblocks: Factor out calls to strtoul to a helper function
Theodore Ts'o [Mon, 22 Oct 2007 14:19:20 +0000 (10:19 -0400)] 
badblocks: Factor out calls to strtoul to a helper function

The strtoul() function has a lot of messy error checking that needs to
be done; by factoring it out into one place we can make sure it's done
right in all of the places where it is called.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agobadblocks: Change unsigned long to blk_t and unsigned int, as appropriate
Theodore Ts'o [Mon, 22 Oct 2007 14:09:05 +0000 (10:09 -0400)] 
badblocks: Change unsigned long to blk_t and unsigned int, as appropriate

This will make it easier for us to support 64-bit block numbers when
the time comes.  Not that running badblocks on a > 4TB machine is
anything I want to contemplate!

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agobadblocks: Use unsigned int instead of unsigned long for test patterns
Theodore Ts'o [Mon, 22 Oct 2007 13:51:50 +0000 (09:51 -0400)] 
badblocks: Use unsigned int instead of unsigned long for test patterns

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agobadblocks: Factor out calls to strtoul to a helper function
Theodore Ts'o [Mon, 22 Oct 2007 14:19:20 +0000 (10:19 -0400)] 
badblocks: Factor out calls to strtoul to a helper function

The strtoul() function has a lot of messy error checking that needs to
be done; by factoring it out into one place we can make sure it's done
right in all of the places where it is called.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agobadblocks: Change unsigned long to blk_t and unsigned int, as appropriate
Theodore Ts'o [Mon, 22 Oct 2007 14:09:05 +0000 (10:09 -0400)] 
badblocks: Change unsigned long to blk_t and unsigned int, as appropriate

This will make it easier for us to support 64-bit block numbers when
the time comes.  Not that running badblocks on a > 4TB machine is
anything I want to contemplate!

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agobadblocks: Use unsigned int instead of unsigned long for test patterns
Theodore Ts'o [Mon, 22 Oct 2007 13:51:50 +0000 (09:51 -0400)] 
badblocks: Use unsigned int instead of unsigned long for test patterns

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agochattr: provide an exit code in case of failure and add -f flag
Theodore Ts'o [Mon, 22 Oct 2007 12:51:39 +0000 (08:51 -0400)] 
chattr: provide an exit code in case of failure and add -f flag

Fix chattr so that if there are errors, it will report it via a
non-zero exit code.  It will now explicitly give errors when
attempting to set files that are not files or directories (which are
currently not supported under Linux).  The -f flag will suppress error
messages from being printed, although the exit status will still be
non-zero.

Addresses-Red-Hat-Bugzilla: #180596

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
16 years agolibe2p: Change iterate_on_dir so that it counts non-zero returns
Theodore Ts'o [Mon, 22 Oct 2007 12:25:13 +0000 (08:25 -0400)] 
libe2p: Change iterate_on_dir so that it counts non-zero returns

To allow error messages to be reflected up, if the callback function
returns a non-zero value, bump a counter and return the number of
times the callback function signals an error by returning a non-zero
status code.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agolibe2p: Use lstat() instead of stat() in fsetflags() and fgetflags()
Theodore Ts'o [Mon, 22 Oct 2007 05:36:13 +0000 (01:36 -0400)] 
libe2p: Use lstat() instead of stat() in fsetflags() and fgetflags()

We can't set the flags on symbolic links, so check for them using
lstat().

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoMerge branch 'maint' into next
Theodore Ts'o [Mon, 15 Oct 2007 20:24:56 +0000 (16:24 -0400)] 
Merge branch 'maint' into next

16 years agomke2fs: Change usage message to use -E instead -R, which is deprecated
Theodore Ts'o [Mon, 15 Oct 2007 20:20:54 +0000 (16:20 -0400)] 
mke2fs: Change usage message to use -E instead -R, which is deprecated

The -R option is only used for backwards compatibility, and -E is
preferred, so change the usage message accordingly.

Signed-off-by: Coly Li <coyli@suse.de>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agolibblkid: recognize squashfs filesystems on BE systems.
Eric Sandeen [Mon, 15 Oct 2007 17:48:44 +0000 (12:48 -0500)] 
libblkid: recognize squashfs filesystems on BE systems.

squashfs has no uuid or labels, so all we need is the magic
(for big-endian too!)

Addresses-Red-Hat-Bugzilla: #305151

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
16 years agolibext2fs: Add EXT2_DESC_SIZE and EXT2_DESC_PER_BLOCK macros
Valerie Clement [Thu, 30 Aug 2007 15:38:13 +0000 (17:38 +0200)] 
libext2fs: Add EXT2_DESC_SIZE and EXT2_DESC_PER_BLOCK macros

Add macros to support variable-length group descriptors for ext4.

Signed-off-by: Valerie Clement <valerie.clement@bull.net>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agolibext2fs: cleanup usage of unsigned int or __u32 and replace it with blk_t
Valerie Clement [Thu, 30 Aug 2007 15:33:40 +0000 (17:33 +0200)] 
libext2fs: cleanup usage of unsigned int or __u32 and replace it with blk_t

Signed-off-by: Valerie Clement <valerie.clement@bull.net>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agolibext2fs: use ext2fs_group_first_block() instead of open-coded equivalent
Valerie Clement [Thu, 30 Aug 2007 15:31:36 +0000 (17:31 +0200)] 
libext2fs: use ext2fs_group_first_block() instead of open-coded equivalent

Use ext2fs_group_first_block() instead of the open-coded equivalent in
ext2fs_super_and_bgd_loc() and ext2fs_descriptor_block_loc().

Signed-off-by: Valerie Clement <valerie.clement@bull.net>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoAdd blk64_t type definition
Theodore Ts'o [Sun, 14 Oct 2007 15:23:20 +0000 (11:23 -0400)] 
Add blk64_t type definition

This will be used for all new functions so we can gradually move
e2fsprogs to support 64 bit blocks.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agolibblkid: detect squashfs
Eric Sandeen [Tue, 25 Sep 2007 17:02:50 +0000 (12:02 -0500)] 
libblkid: detect squashfs

libblkid: recognize squashfs filesystems

squashfs has no uuid or labels, so all we need is the magic.

Addresses-Red-Hat-Bugzilla: #305151

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
16 years agoMerge branch 'maint'
Theodore Ts'o [Sat, 6 Oct 2007 16:41:26 +0000 (12:41 -0400)] 
Merge branch 'maint'

16 years agoe2fsck: backup superblocks if key constants have changed
Theodore Ts'o [Mon, 1 Oct 2007 13:18:54 +0000 (09:18 -0400)] 
e2fsck: backup superblocks if key constants have changed

If the primary superblock differs from the backup superblock in
certain key respects, force a full check (if e2fsck was invoked in
preen mode).  If the filesystem check passes cleanly, and the
filesystem was opened in read/write mode, then write the primary
superblock to all of the backups.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoe2fsck: update the backup superblocks if the feature bitmasks are changed
Theodore Ts'o [Sat, 6 Oct 2007 16:37:08 +0000 (12:37 -0400)] 
e2fsck: update the backup superblocks if the feature bitmasks are changed

If e2fsck adds or deletes any of the feature bitmasks, clear
EXT2_FLAG_MASTER_SB_ONLY so the backup superblocks are updated when
e2fsck finishes.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoext2fs_dblist_dir_iterate: Fix ABORT propagation logic
Theodore Ts'o [Sun, 23 Sep 2007 15:39:24 +0000 (11:39 -0400)] 
ext2fs_dblist_dir_iterate: Fix ABORT propagation logic

ext2fs_dblist_dir_iterate() calls ext2fs_dblist_iterate(), which calls
ext2fs_process_dir_block(), which in turn calls the helper function
db_dir_proc() which calls callback function passed into
ext2fs_dblist_dir_iterate().  At each stage the conventions for
signalling requests to abort the iteration or to signal errors
changes, db_dir_proc() was not properly mapping the abort request back
to ext2fs_dblist_iterate().

Currently db_dir_proc() is ignoring errors (i/o errors or directory
block corrupt errors) from ext2fs_process_dir_block(), since the main
user of ext2fs_dblist_dir_iterate() is e2fsck, for which this is the
correct behavior.  In the future ext2fs_dblist_dir_iterate() could
take a flag which would cause it to abort if
ext2fs_process_dir_block() returns an error; however, it's not clear
how useful this would be since we don't have a way of signalling the
exact nature of which block had the error, and the caller wouldn't
have a good way of knowing what percentage of the directory block list
had been processed.  Ultimately this may not be the best interface for
applications that need that level of error reporting.

Thanks to Vladimir V. Saveliev <vs@clusterfs.com> for pointing out
this problem.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agolibblkid: Add more magic numbers that might mean there is a FAT filesystem
Theodore Ts'o [Sun, 23 Sep 2007 13:50:11 +0000 (09:50 -0400)] 
libblkid: Add more magic numbers that might mean there is a FAT filesystem

The FAT filesystem doesn't have its superblock with a set of magic
strings in a fixed location.  Therefore, we must also check for the
FAT filesystem if it looks like we have an MBR at the beginning of the
partition.  We previously checked if the first byte was a jump
instruction but that missed some USB disks with only one bootable
partition.  Now we check for the MBR signature (0x55AA at offset 510)
as well as any partition where byte 0 is \351 or \353.

Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoe2fsck: Don't mark the filesystem invalid because of time errors
Theodore Ts'o [Sun, 23 Sep 2007 12:20:51 +0000 (08:20 -0400)] 
e2fsck: Don't mark the filesystem invalid because of time errors

If superblock mount time or last write time is in the future, and the
user refuses to fix the problem, don't mark the filesystem as being
invalid and needing to be checked.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoWork around lame Ubuntu init scripts / installer bugs
Theodore Ts'o [Sun, 23 Sep 2007 00:42:04 +0000 (20:42 -0400)] 
Work around lame Ubuntu init scripts / installer bugs

The Ubuntu init scripts don't properly set the system time correctly
from hardware clock if the hardware clock is configured to tick local
time instead of GMT time.

Work around this as best as we can by providing an option in
/etc/e2fsck.conf which can be set on Ubuntu systems:

[options]
buggy_init_scripts = 1

Addresses-Debian-Bug: #441093
Addresses-Ubuntu-Bug: #131201

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agofsck: Ignore /etc/fstab entries for bind mounts
Theodore Ts'o [Thu, 20 Sep 2007 19:06:35 +0000 (15:06 -0400)] 
fsck: Ignore /etc/fstab entries for bind mounts

If a user specifies a bind mount with a non-zero fsck pass number, for
example:

/foo    /bar    ext3    bind,defaults   1 3

print a warning and ignore the fstab entry.

Addresses-Red-Hat-Bugzilla: #151533

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoAdd test for the case where s_inode_size is zero
Theodore Ts'o [Fri, 7 Sep 2007 21:06:25 +0000 (17:06 -0400)] 
Add test for the case where s_inode_size is zero

Older e2fsck's would crash; e2fsck should now automatically retry
using the backup superblock if it is present.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoDelete the test.img file after running the resize2fs tests
Theodore Ts'o [Fri, 7 Sep 2007 21:03:48 +0000 (17:03 -0400)] 
Delete the test.img file after running the resize2fs tests

The resize2fs tests, r_move_itable and r_resize_inode, were not
deleting the test.img tmpfile after completing the test.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoe2fsck: If the superblock is corrupt, automatically retry with the backup sb
Theodore Ts'o [Fri, 7 Sep 2007 20:54:11 +0000 (16:54 -0400)] 
e2fsck: If the superblock is corrupt, automatically retry with the backup sb

E2fsck currently only retries with the backup superblock if the
primary superblock is missing (e.g., overwritten with garbage).  If
the superblock is just corrupted enough that it looks like ext2/3/4
superblock, but it is corrupt enough that ext2fs_open2() returns an
error, e2fsck stops without retrying.  Let's fix this oversight.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoDon't crash if s_inode_size is zero
Theodore Ts'o [Fri, 7 Sep 2007 20:40:25 +0000 (16:40 -0400)] 
Don't crash if s_inode_size is zero

Any attempt to open a filesystem with s_inode_size set to zero causes
a floating point exception.  This is true for e2fsck, dumpe2fs,
e2image, etc.  Fix ext2fs_open2() so that it returns the error code
EXT2_ET_CORRUPT_SUPERBLOCK instead of crashing.

Thanks to Dean Bender for reporting this bug.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoMerge branch 'maint'
Theodore Ts'o [Tue, 21 Aug 2007 02:58:25 +0000 (22:58 -0400)] 
Merge branch 'maint'

16 years agoUse sscanf instead of atoi when parsing e2fsck options
Theodore Ts'o [Tue, 21 Aug 2007 02:55:33 +0000 (22:55 -0400)] 
Use sscanf instead of atoi when parsing e2fsck options

atoi() does not check for errors so it shouldn't be used for human
input.  For example, if the user enters the command "e2fsck -C -n" and
forgets that -C requires an argument, the -n will be used as the
argument to -C, and not parsed as an option.  When using sscanf(),
this error case can be detected.

Addresses-Debian-Bug: #435381

Signed-off-by: Bernd Schubert <bs@q-leap.de>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoUpdate Dutch translation file from the Translation Project
Theodore Ts'o [Tue, 21 Aug 2007 02:14:36 +0000 (22:14 -0400)] 
Update Dutch translation file from the Translation Project

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoFix typo and clarify the uuidgen man page
Theodore Ts'o [Tue, 21 Aug 2007 01:46:19 +0000 (21:46 -0400)] 
Fix typo and clarify the uuidgen man page

Thanks to Matt Kraai for noticing the misplaced sentence inserted into
the description section.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoRemove configure --enable-swapfs and associated support #defines
Theodore Ts'o [Sat, 11 Aug 2007 07:11:12 +0000 (03:11 -0400)] 
Remove configure --enable-swapfs and associated support #defines

This removes the last vestiges of support for the legacy PowerPC
big-endian filesystem format.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoClean up applications to not use EXT2FS_ENABLE_SWAPFS or EXT2_FLAG_SWAP_BYTES
Theodore Ts'o [Sat, 11 Aug 2007 06:57:31 +0000 (02:57 -0400)] 
Clean up applications to not use EXT2FS_ENABLE_SWAPFS or EXT2_FLAG_SWAP_BYTES

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoClean up libext2fs by byte swapping iff WORDS_BIGENDIAN
Theodore Ts'o [Sat, 11 Aug 2007 05:56:48 +0000 (01:56 -0400)] 
Clean up libext2fs by byte swapping iff WORDS_BIGENDIAN

We don't need byte swapping to be a run-time option; it can just be a
compile-time option instead.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoRemove PowerPC bitmap hackery since it's not been needed since Linux 2.1
Theodore Ts'o [Sat, 11 Aug 2007 05:34:22 +0000 (01:34 -0400)] 
Remove PowerPC bitmap hackery since it's not been needed since Linux 2.1

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoRemove e2fsck's swapfs test, since we've removed the functionality
Theodore Ts'o [Sat, 11 Aug 2007 04:00:01 +0000 (00:00 -0400)] 
Remove e2fsck's swapfs test, since we've removed the functionality

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoRemove e2fsck's -s and -S options to byte-swap ancient PPC filesystems
Theodore Ts'o [Sat, 11 Aug 2007 03:58:56 +0000 (23:58 -0400)] 
Remove e2fsck's -s and -S options to byte-swap ancient PPC filesystems

The need for fixing byte-swapped filesystems is long-gone, and this is
getting in the way of cleaning up e2fsprogs's bitmaps code.  So let's
get rid of it; modern kernels haven't been able to deal with a
byte-swapped filesystem in in about 9 years.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoMerge branch 'maint'
Theodore Ts'o [Sat, 4 Aug 2007 03:21:34 +0000 (23:21 -0400)] 
Merge branch 'maint'

16 years agoUpdate Swedish translation file from the Translation Project
Theodore Ts'o [Sat, 4 Aug 2007 02:25:25 +0000 (22:25 -0400)] 
Update Swedish translation file from the Translation Project

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoMake sure $prefix/etc is created before installing mke2fs.conf
Theodore Ts'o [Sat, 4 Aug 2007 02:13:38 +0000 (22:13 -0400)] 
Make sure $prefix/etc is created before installing mke2fs.conf

Fix up $(root_sysconfdir) handling misc/Makefile.in so that
make install and make uninstall works correctly when $prefix != /.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoe2fsck: Allow i_size to be rounded up to the size of a VM page
Theodore Ts'o [Sat, 4 Aug 2007 00:43:37 +0000 (20:43 -0400)] 
e2fsck: Allow i_size to be rounded up to the size of a VM page

Allow files to be preallocated on-disk up to the next multiple of the
system's page size without complaining about extra blocks.

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: Girish Shilamkar <girish@clusterfs.com>
Signed-off-by: Kalpak Shah <kalpak@clusterfs.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoAdd "make check" to the RPM spec file
Theodore Ts'o [Sat, 4 Aug 2007 00:12:32 +0000 (20:12 -0400)] 
Add "make check" to the RPM spec file

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
16 years agoMiscellaneous Cleanups
Theodore Ts'o [Sat, 4 Aug 2007 00:10:46 +0000 (20:10 -0400)] 
Miscellaneous Cleanups

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: Girish Shilamkar <girish@clusterfs.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoAdd I/O statistics to e2fsck
Theodore Ts'o [Sat, 4 Aug 2007 00:07:09 +0000 (20:07 -0400)] 
Add I/O statistics to e2fsck

This patch instruments the libext2fs unix I/O manager and adds bytes
read/written and data rate to e2fsck -tt pass/overall timing output.

Signed-off-by: Jim Garlick <garlick@llnl.gov>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoSilence makefile from showing the awk command when building DEFAULT_TO_C
Theodore Ts'o [Fri, 3 Aug 2007 23:02:03 +0000 (19:02 -0400)] 
Silence makefile from showing the awk command when building DEFAULT_TO_C

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoFix gcc -Wall warnings
Theodore Ts'o [Fri, 3 Aug 2007 22:56:01 +0000 (18:56 -0400)] 
Fix gcc -Wall warnings

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agolibext2fs: 32-bit bitmap refactorization, part 3
Theodore Ts'o [Mon, 23 Jul 2007 08:32:48 +0000 (04:32 -0400)] 
libext2fs: 32-bit bitmap refactorization, part 3

Create new functions ext2fs_{set,get}_{inode,block}_bitmap_range()
which allow programs like e2fsck, dumpe2fs, etc. to get and set chunks
of the bitmap at a time.

Move the representation details of the 32-bit old-style bitmaps into
gen_bitmap.c.

Change calls in dumpe2fs, mke2s, et. al to use the new abstractions.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agolibext2fs: 32-bit bitmap refactorization, part 2
Theodore Ts'o [Mon, 23 Jul 2007 03:42:14 +0000 (23:42 -0400)] 
libext2fs: 32-bit bitmap refactorization, part 2

Move the contents of rs_bitmap.c and cmp_bitmaps.c into gen_bitmap.c
and bitmaps.c.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agolibext2fs: 32-bit bitmap refactorization, part 1
Theodore Ts'o [Mon, 23 Jul 2007 02:59:50 +0000 (22:59 -0400)] 
libext2fs: 32-bit bitmap refactorization, part 1

Move the 32-bit specific bitmap code into gen_bitmap.c, and the
high-level interfaces into bitmaps.c.  Eventually we'll move the
new-style bitmap code into gen_bitmap64.c, but first we need to
isolate the code with knowledge of the bitmap internals in one place
first.

In this patch we move allocation, free, copy, clear, set_padding, and
fudge_end function into gen_bitmap.c, and make sure that the bitmaps.c
and bitops.c no longer have any knowledge of the bitmap internals.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoMove ext2fs_get_{block,inode}_bitmap_{start,end}() to generic functions
Theodore Ts'o [Sun, 22 Jul 2007 23:16:08 +0000 (19:16 -0400)] 
Move ext2fs_get_{block,inode}_bitmap_{start,end}() to generic functions

Create ext2fs_get_generic_bitmap_{start,end}() and use them for inline
functions.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoUninline ext2fs_{mark,unmark,test}_block_bitmap_range() to gen_bitmap.c
Theodore Ts'o [Sun, 22 Jul 2007 22:54:10 +0000 (18:54 -0400)] 
Uninline ext2fs_{mark,unmark,test}_block_bitmap_range() to gen_bitmap.c

Also uninline ext2fs_fast_{mark,unmark,test}_block_bitmap_range() and
use the generic routines.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoChange fast ext2fs bitmap functions to use the generic bitmap functions
Theodore Ts'o [Sun, 22 Jul 2007 21:57:13 +0000 (17:57 -0400)] 
Change fast ext2fs bitmap functions to use the generic bitmap functions

This changes ext2fs_fast_{mark,unmark,test}_{inode,block}_bitmap() to
be inline functions which calls ext2fs_{mark,unmark,test}_generic_bitmap().

This is part of the preparation to support the new-style bitmaps.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoMove ext2fs_test_generic_bitmap() to gen_bitmap.c
Theodore Ts'o [Sun, 22 Jul 2007 21:42:52 +0000 (17:42 -0400)] 
Move ext2fs_test_generic_bitmap() to gen_bitmap.c

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoFix mke2fs tests to avoid needing any significant ^M (CR) characters
Theodore Ts'o [Sun, 22 Jul 2007 20:36:51 +0000 (16:36 -0400)] 
Fix mke2fs tests to avoid needing any significant ^M (CR) characters

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoFix test in ext2fs_check_desc() for inode table within block group
Eric Sandeen [Fri, 20 Jul 2007 21:50:26 +0000 (16:50 -0500)] 
Fix test in ext2fs_check_desc() for inode table within block group

The test in ext2fs_check_desc() is off by one; if the inode table
goes all the way to the last block of the block group, it will
falsely assert that it has extended past it.  The last block
of a range is start + len -1, not start + len.

You can create (valid) filesystems that will cause e2fsck to complain
via one of the following mkfs commands:

mkfs.ext3 -F -b 1024 /dev/sdb1 2046000000
mke2fs -j -F -b 4096 -m 0 -N 5217280 /mnt/test/fsfile2 327680
mkfs.ext2 -F -b 1024 -m 0 -g 256 -N 3744 fsfile 1024

Addresses-Red-Hat-Bugzilla: #214765

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoProperly calculate overhead in ext2fs_initialize()
Theodore Ts'o [Sun, 22 Jul 2007 19:07:13 +0000 (15:07 -0400)] 
Properly calculate overhead in ext2fs_initialize()

For some odd geometries*, mkfs will try to allocate inode tables off
the end of the block group and fail, rather than warning that too
many inodes have been requested.

This is because when ext2fs_initialize calculates metadata overhead,
it is only adding in group descriptor blocks and the superblock
if the *last* bg contains them - but the first bg also has all of
the various metadata bits taking up space.

We need to calculate the overhead both for the first block group and
the last block groups separately, since the two different tests need
to know what the overheads are for those two cases, which may be
different.

*for example "mke2fs  -b 1024 -m 0 -g 256 -N 3745 fsfile 1024"

(Note, the test here is a little funky; the expected output is
actually a mkfs failure - but a proper failure instead of the
allocator catching the problem at the last minute)

Addresses-Red-Hat-Bugzilla: #241767

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoAdd Catalan translation from the Translation Project
Theodore Ts'o [Wed, 18 Jul 2007 16:28:43 +0000 (12:28 -0400)] 
Add Catalan translation from the Translation Project

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoFix big-endian byte-swapping bug in ext2fs_swap_inode_full()
Eric Sandeen [Wed, 18 Jul 2007 01:40:25 +0000 (20:40 -0500)] 
Fix big-endian byte-swapping bug in ext2fs_swap_inode_full()

We need to set t->i_file_acl before we test it in
ext2fs_inode_data_blocks()

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoUpdate ChangeLog, README, RELEASE-NOTES for 1.40.2 release v1.40.2
Theodore Ts'o [Sat, 14 Jul 2007 13:03:17 +0000 (09:03 -0400)] 
Update ChangeLog, README, RELEASE-NOTES for 1.40.2 release

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoUpdate tune2fs man page to include more discussion of reserved blocks
Theodore Ts'o [Thu, 12 Jul 2007 03:20:17 +0000 (23:20 -0400)] 
Update tune2fs man page to include more discussion of reserved blocks

Addresses-Launchpad-bug: #47817

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoUpdate Dutch and Vietnamese PO files from the Translation Project
Theodore Ts'o [Thu, 12 Jul 2007 00:22:52 +0000 (20:22 -0400)] 
Update Dutch and Vietnamese PO files from the Translation Project

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoFix e2fsck segfault on very badly damaged filesystems
Theodore Ts'o [Wed, 11 Jul 2007 17:42:43 +0000 (13:42 -0400)] 
Fix e2fsck segfault on very badly damaged filesystems

A recent change to e2fsck_add_dir_info() to use tdb files to check
filesystems with a very large number of filesystems had a typo which
caused us to resize the wrong data structure.  This would cause a
array overrun leading to malloc pointer corruptions.  Since we
normally can very accurately predict how big the the dirinfo array
needs to be, this bug only got triggered on very badly corrupted
filesystems.

Thanks to Andreas Dilger for submitting the test case which discovered
this problem, and to Kalpak Shah for writing a random testing script
which created the test case.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoUpdate Polish translation from the Translation Project
Theodore Ts'o [Tue, 10 Jul 2007 13:45:47 +0000 (09:45 -0400)] 
Update Polish translation from the Translation Project

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoe2fsck: Fix salvage_directory when the last entry's rec_len is too big
Kalpak Shah [Mon, 9 Jul 2007 17:05:45 +0000 (13:05 -0400)] 
e2fsck: Fix salvage_directory when the last entry's rec_len is too big

  Recently, one of our customers found this message in pass2 of e2fsck
  while doing some regression testing:

  "Entry '4, 0x695a, 0x81ff, 0x0040, 0x8320, 0xa192, 0x0021' in ??? (136554) has
  rec_len of 14200, should be 26908."

  Both the displayed rec_len and the "should be" value are bogus. The
  reason is that salvage_directory sets a offset beyond blocksize
  leading to bogus messages.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoUpdate Turkish translation from Translation Project
Theodore Ts'o [Mon, 9 Jul 2007 17:13:35 +0000 (13:13 -0400)] 
Update Turkish translation from Translation Project

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoFix typo'ed version number in the release notes
Theodore Ts'o [Mon, 9 Jul 2007 03:24:19 +0000 (23:24 -0400)] 
Fix typo'ed version number in the release notes

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoFix debian/control file to use ${binary:Version} instead of ${Source-Version} v1.40.1
Theodore Ts'o [Mon, 9 Jul 2007 01:36:59 +0000 (21:36 -0400)] 
Fix debian/control file to use ${binary:Version} instead of ${Source-Version}

This is a Lintian-requested cleanup so that e2fsprogs will be
correctly built with binaryNMU's.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoFix up Lintain complaint about the "make distclean" ignoring errors
Theodore Ts'o [Mon, 9 Jul 2007 01:36:12 +0000 (21:36 -0400)] 
Fix up Lintain complaint about the "make distclean" ignoring errors

This is a Debian-specific debian/rules change, just to clean up the
packaging script.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoUpdate ChangeLog, README, RELEASE-NOTES for 1.40.1 release
Theodore Ts'o [Mon, 9 Jul 2007 00:26:51 +0000 (20:26 -0400)] 
Update ChangeLog, README, RELEASE-NOTES for 1.40.1 release

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoAdd debugging printf to blkid's probe routine when original fs type failed
Theodore Ts'o [Mon, 9 Jul 2007 00:17:31 +0000 (20:17 -0400)] 
Add debugging printf to blkid's probe routine when original fs type failed

This particular bit of code has caused problems before, so make it
easier to debug problems caused by the probe verification looping
forever here.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoStop after the second '.' when parsing version numbers
Theodore Ts'o [Sun, 8 Jul 2007 16:37:13 +0000 (12:37 -0400)] 
Stop after the second '.' when parsing version numbers

Now that we are moving to x.y.z version number scheme for maintenance
releases, we ned to change ext2fs_parse_version_string and
blkid_parse_version_string to ignore the second period so we don't
have maintenance releases with a substantially bigger verison number
than the initial x.y release.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoUpdate the *.po and *.gmo files after the e2fsprogs.pot update
Theodore Ts'o [Sun, 8 Jul 2007 16:09:40 +0000 (12:09 -0400)] 
Update the *.po and *.gmo files after the e2fsprogs.pot update

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoRemove Changelog files since they're not used after the git migration
Theodore Ts'o [Sun, 8 Jul 2007 02:25:07 +0000 (22:25 -0400)] 
Remove Changelog files since they're not used after the git migration

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoUpdate e2fsprogs.pot for translators
Theodore Ts'o [Sun, 8 Jul 2007 02:24:13 +0000 (22:24 -0400)] 
Update e2fsprogs.pot for translators

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoFix bug which could cause libblkid to loop forever
Theodore Ts'o [Sat, 7 Jul 2007 22:32:26 +0000 (18:32 -0400)] 
Fix bug which could cause libblkid to loop forever

When revalidating a partition where there is obsolete information in
/etc/blkid.tab, we end up freeing a the type tag without clearing
dev->bid_type, causing blkid_verify() to loop forever.

Addresses-Debian-Bug: #432052

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoUpdate French and Dutch translation files
Theodore Ts'o [Sat, 7 Jul 2007 21:44:53 +0000 (17:44 -0400)] 
Update French and Dutch translation files

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoUpdate Vietnamese PO file from the Translation Project
Theodore Ts'o [Thu, 5 Jul 2007 03:30:36 +0000 (23:30 -0400)] 
Update Vietnamese PO file from the Translation Project

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoImprove the config/parse_types.sh helper script
Theodore Ts'o [Wed, 4 Jul 2007 20:28:47 +0000 (16:28 -0400)] 
Improve the config/parse_types.sh helper script

Fix a potential security problem if e2fsprogs is built as root (as
Gentoo does!).  In addition fix the script and how it is called from
the configure script so that it does the right thing when
cross-compiling.

Fixes-Gentoo-bug: #146903

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoFix bogus strip permission errors when building under Debian
Theodore Ts'o [Wed, 4 Jul 2007 18:51:18 +0000 (14:51 -0400)] 
Fix bogus strip permission errors when building under Debian

When building the e2fsprogs dpkg's, the dh_strip command emits a large
number of error messages caused by the permissions not being right.  So
run dh_fixperms before running dh_strip.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoCompile the default mke2fs.conf into mke2fs program
Theodore Ts'o [Wed, 4 Jul 2007 18:10:46 +0000 (14:10 -0400)] 
Compile the default mke2fs.conf into mke2fs program

People are getting surprised by mke2fs creating filesystems with
different defaults than earlier versions of mke2fs if mke2fs.conf is
not present.  Having gotten two complaints about ramdisks getting
created by with 4k blocksizes which then blow up when the ramdisk is
mounted with a "Magic mismatch, very weird" error message from the
kernel, let's fix this by making sure mke2fs has a built-in version of
mke2fs.conf file.  People can still override the built-in version of
mke2fs.conf by editing /etc/mke2fs.conf, but this maintains the
previous behavior.

Addresses-Sourceforge-Bug: #1745818

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