Whamcloud - gitweb
tools/e2fsprogs.git
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>
18 years agoUpdate French, Dutch, Polish, Swedish, and Turkish translations.
Theodore Ts'o [Sun, 9 Apr 2006 22:33:22 +0000 (18:33 -0400)]
Update French, Dutch, Polish, Swedish, and Turkish translations.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoFix asm_types.h type conflicts
Theodore Ts'o [Sun, 9 Apr 2006 12:41:55 +0000 (08:41 -0400)]
Fix asm_types.h type conflicts

This caused FTBFS bugs on AMD64 platforms, since it uses a different
64-bit type when compared with IA64, so we need to make our
autoconfiguration system more intelligent.

Addresses Debian Bugs: #360661, #360317

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoFix ext2fs_add_journal_inode() when filesystem is opened in exclusive mode
Theodore Ts'o [Tue, 4 Apr 2006 23:23:41 +0000 (19:23 -0400)]
Fix ext2fs_add_journal_inode() when filesystem is opened in exclusive mode

If the filesystem is opened in exclusive mode, then device will be
busy by definition, so don't return -EBUSY.  This caused mke2fs -j to
fail on the 1.39-WIP (29-Mar-2006) release.  (Addresses Debian Bug:
#360652)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoFix Debian FTBFS bug due to missing build-dependency on libdevmapper-dev
Theodore Ts'o [Sun, 2 Apr 2006 14:04:36 +0000 (10:04 -0400)]
Fix Debian FTBFS bug due to missing build-dependency on libdevmapper-dev

Addresses Debian Bug: #360046

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoAdded tag E2FSPROGS-1.39-WIP-0330 for changeset cc5d09c487b27487925fb34d8ccd50a19e801ec4 E2FSPROGS-1.39-WIP-0330
Theodore Ts'o [Thu, 30 Mar 2006 06:06:49 +0000 (01:06 -0500)]
Added tag E2FSPROGS-1.39-WIP-0330 for changeset cc5d09c487b27487925fb34d8ccd50a19e801ec4

18 years agoDebian build: remove conffile from e2fsprogs-udeb, and remove explicit conffile
Theodore Ts'o [Thu, 30 Mar 2006 06:03:17 +0000 (01:03 -0500)]
Debian build: remove conffile from e2fsprogs-udeb, and remove explicit conffile

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoUpdate release notes and version.h for 1.39-WIP-2006-03-29 release
Theodore Ts'o [Thu, 30 Mar 2006 01:40:23 +0000 (20:40 -0500)]
Update release notes and version.h for 1.39-WIP-2006-03-29 release

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoUpdate French translation and update PO template file.
Theodore Ts'o [Thu, 30 Mar 2006 01:39:40 +0000 (20:39 -0500)]
Update French translation and update PO template file.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoAdd udeb: lines to the Debian's shlibs files
Theodore Ts'o [Thu, 30 Mar 2006 00:03:38 +0000 (19:03 -0500)]
Add udeb: lines to the Debian's shlibs files

Package: e2fsprogs
Version: 1.38+1.39-WIP-2005.12.31-1
Severity: wishlist
Tags: patch, d-i

Let's call this an important wishlist bug (important for Debian Installer
anyway :-)

Please add the following line to the shlibs files for libblkid and libuuid
respectively:
udeb: libblkid 1 libblkid1-udeb
udeb: libuuid 1 libuuid1-udeb

This will allow dpkg/debhelper to properly set the dependencies for udebs
that depend on the e2fsprogs libs.
Please see #345472 and #345475 for further info on this.

This will also mean that, eventually, we will be able to drop the
"Provides: ..." for the library udebs, but we cannot do that until other
udebs that currently depend on them have been rebuilt.
I'll file a separate bug when that change can be made.

Addresses Debian Bug: #356293
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoFix the x86 asm constraints for ext2fs_set/clear_bit.
Theodore Ts'o [Wed, 29 Mar 2006 19:23:00 +0000 (14:23 -0500)]
Fix the x86 asm constraints for ext2fs_set/clear_bit.

The assembly function reads/writes the data files, so make sure we
tell gcc that.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoEnhance dumpe2fs to print the size of journal
Theodore Ts'o [Wed, 29 Mar 2006 19:03:07 +0000 (14:03 -0500)]
Enhance dumpe2fs to print the size of journal

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoFix typo's in badblocks(8)'s man page.
Theodore Ts'o [Mon, 27 Mar 2006 17:16:30 +0000 (12:16 -0500)]
Fix typo's in badblocks(8)'s man page.

Addresses Debian Bug: #357951

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoAdd badblocks(8) to SEE ALSO section of e2fsck's man page.
Theodore Ts'o [Mon, 27 Mar 2006 17:10:07 +0000 (12:10 -0500)]
Add badblocks(8) to SEE ALSO section of e2fsck's man page.

Addresses Debian Bug: #347295

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoExplain in mke2fs and tune2fs man pages that shared journals are not supported
Theodore Ts'o [Mon, 27 Mar 2006 16:53:00 +0000 (11:53 -0500)]
Explain in mke2fs and tune2fs man pages that shared journals are not supported

Addresses Debian Bug: #316040

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoUpdate the debian build files to deal with /etc/mke2fs.conf
Theodore Ts'o [Mon, 27 Mar 2006 06:11:06 +0000 (01:11 -0500)]
Update the debian build files to deal with /etc/mke2fs.conf

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoFix minor installation problems in the misc's Makefile
Theodore Ts'o [Mon, 27 Mar 2006 06:10:17 +0000 (01:10 -0500)]
Fix minor installation problems in the misc's Makefile

Make sure $(DESTDIR)/usr/share/man/man5 exists when installing the man
page.  Make sure the compressed version  of the man pages are deleted
when installing the man pages.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoFix misc. problems in the mke2fs.conf(5) man page.
Theodore Ts'o [Mon, 27 Mar 2006 06:05:26 +0000 (01:05 -0500)]
Fix misc. problems in the mke2fs.conf(5) man page.

Use "stanza" to refer to top-level stanzas, and fix a few typos.  Also
indent the sample profile format so it looks nicer.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoAdd man page documenting the /etc/e2fsck.conf configuration file.
Theodore Ts'o [Mon, 27 Mar 2006 06:03:11 +0000 (01:03 -0500)]
Add man page documenting the /etc/e2fsck.conf configuration file.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoFix the i386 bitmap operations so they are 32-bit clean
Theodore Ts'o [Sat, 25 Mar 2006 18:42:45 +0000 (13:42 -0500)]
Fix the i386 bitmap operations so they are 32-bit clean

The x86 assembly instructures for bit test-and-set, test-and-clear,
etc., interpret the bit number as a 32-bit signed number, which is
problematic in order to support filesystems > 8TB.

Added new inline functions (in C) to implement a
ext2fs_fast_set/clear_bit() that does not return the old value of the
bit, and use it for the fast block/bitmap functions.

Added a regression test suite to test the low-level bit operations
functions to make sure they work correctly.

Note that a bitmap can address 2**32 blocks requires 2**29 bytes, or
512 megabytes.  E2fsck requires 3 (and possibly 4 block bitmaps),
which means that the block bitmaps can require 2GB all by themselves,
and this doesn't include the 4 or 5 inode bitmaps (which assuming an
8k inode ratio, will take 256 megabytes each).  This means that it's
more likely that a filesystem check of a filesystem greater than 2**31
blocks will fail if the e2fsck is dynamically linked (since the shared
libraries can consume a substantial portion of the 3GB address space
available to x86 userspace applications).  Even if e2fsck is
statically linked, for a badly damaged filesystem, which may require
additional block and/or inode bitmaps, I am not sure e2fsck will
succeed in all cases.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoFix typo bug in previous commit (6ae1ed49c8c6)
Theodore Ts'o [Sat, 25 Mar 2006 06:42:02 +0000 (01:42 -0500)]
Fix typo bug in previous commit (6ae1ed49c8c6)

"fd" should have been "probe.fd" so blkid/probe.c can compile without
errors.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agomklost+found: Create full-sized a lost+found directory with 4k+ blocksizes
Theodore Ts'o [Fri, 24 Mar 2006 03:37:02 +0000 (22:37 -0500)]
mklost+found: Create full-sized a lost+found directory with 4k+ blocksizes

Fixed a bug caused by using an insufficiently larger counter field so
that mklost+found would work properly on filesystems with larger block
sizes.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoFix file descriptor leak in blkid library in error paths
Theodore Ts'o [Fri, 24 Mar 2006 03:14:54 +0000 (22:14 -0500)]
Fix file descriptor leak in blkid library in error paths

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoChange mke2fs to use /etc/mke2fs.conf as a configuration file
Theodore Ts'o [Fri, 24 Mar 2006 03:00:01 +0000 (22:00 -0500)]
Change mke2fs to use /etc/mke2fs.conf as a configuration file

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoTighten up profile parsing code by combining functions
Theodore Ts'o [Wed, 22 Mar 2006 15:01:24 +0000 (10:01 -0500)]
Tighten up profile parsing code by combining functions

Integrate profile_std_line() into parse_line(), and profile_parse_file()
into profile_update_file() to make the code use less memory.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoPrevent error messages to stderr caused by libblkid calling libdevmapper
Theodore Ts'o [Sun, 19 Mar 2006 20:26:26 +0000 (15:26 -0500)]
Prevent error messages to stderr caused by libblkid calling libdevmapper

Make the libdevmapper fail quietly if blkid is called without root
privileges or the kernel does not include device mapper support.
(What is the device mapper _library_ doing writing to stderr, anyway?)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoFix format statements to make e2fsprogs programs 32-bit clean
Takashi Sato [Sun, 19 Mar 2006 02:43:46 +0000 (21:43 -0500)]
Fix format statements to make e2fsprogs programs 32-bit clean

Change the format string(%d, %ld) for a block number and inode number
to %u or %lu.

Signed-off-by: Takashi Sato <sho@tnes.nec.co.jp>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoChange resize2fs open modes for mounted and unmounted filesystems
Theodore Ts'o [Sun, 19 Mar 2006 01:03:47 +0000 (20:03 -0500)]
Change resize2fs open modes for mounted and unmounted filesystems

If the filesystem is mounted, open it in read-only mode since the userspace
program should not try to modify it directly.  If the filesystem is not mounted,
open it in exclusive mode to avoid potential problems (such as someone
trying to mount the filesystem while it is being resized).

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoChange mke2fs to create filesystems with the device opened in exclusive mode.
Theodore Ts'o [Sun, 19 Mar 2006 01:02:05 +0000 (20:02 -0500)]
Change mke2fs to create filesystems with the device opened in exclusive mode.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoChange e2fsck to open non-mounted filesystems in exclusive mode
Theodore Ts'o [Sun, 19 Mar 2006 01:01:09 +0000 (20:01 -0500)]
Change e2fsck to open non-mounted filesystems in exclusive mode

Thanks to Andreas Dilger for this idea.  If the filesystem is not mounted,
e2fsck will open it in exclusive mode to prevent the a confused/careless
system administrator from mounting the filesystem while the filesystem
check is taking place, which could cause all sorts of problems.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoAdd an option to debugfs to open filesystems in exclusive mode
Theodore Ts'o [Sun, 19 Mar 2006 00:58:13 +0000 (19:58 -0500)]
Add an option to debugfs to open filesystems in exclusive mode

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoAdd EXT2_FLAG_EXCLUSIVE to the ext2fs library.
Theodore Ts'o [Sun, 19 Mar 2006 00:16:10 +0000 (19:16 -0500)]
Add EXT2_FLAG_EXCLUSIVE to the ext2fs library.

This flag when specified to ext2fs_open or ext2fs_initialize indicates
that the application wants the io_channel to be opened in exclusive mode.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoAdd IO_FLAG_EXCLUSIVE flag to io_channel abstraction
Theodore Ts'o [Sat, 18 Mar 2006 23:57:44 +0000 (18:57 -0500)]
Add IO_FLAG_EXCLUSIVE flag to io_channel abstraction

Add a new io_channel open flag, IO_FLAG_EXCLUSIVE,which requests that
the device be opened in exclusive (O_EXCL) mode.  Add support to the unix_io
implementation for this flag.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoFix documentation: BLOCK_FLAG_TRAVERSE should be BLOCK_FLAG_DEPTH_TRAVERSE
Theodore Ts'o [Sat, 18 Mar 2006 13:26:36 +0000 (08:26 -0500)]
Fix documentation: BLOCK_FLAG_TRAVERSE should be BLOCK_FLAG_DEPTH_TRAVERSE

Addresses Debian Bug #351268

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoFix build when not building any shared libraries.
Theodore Ts'o [Sat, 18 Mar 2006 02:59:13 +0000 (21:59 -0500)]
Fix build when not building any shared libraries.

Add missing real-subdirs:: line to lib/Makefile.library, so there is a
default definition of the real-subdirs target.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoDocument the resize_inode filesystem option in mke2fs man page
Theodore Ts'o [Sat, 18 Mar 2006 02:03:27 +0000 (21:03 -0500)]
Document the resize_inode filesystem option in mke2fs man page

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoFix a signed vs unsigned bug in calc_reserved_gdt_blocks()
Theodore Ts'o [Sat, 18 Mar 2006 01:39:52 +0000 (20:39 -0500)]
Fix a signed vs unsigned bug in calc_reserved_gdt_blocks()

This fixes mke2fs -O resize_inode for very large filesystems (i.e., 20GB).
Addresses Debian Bug #346580

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoAdd support for on-line resizing to resize2fs
Theodore Ts'o [Sat, 18 Mar 2006 00:45:45 +0000 (19:45 -0500)]
Add support for on-line resizing to resize2fs

If the filesystem is mounted, attempt to use the on-line resizing
ioctls to resize the filesystem.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoFix blkid's last verification logic to work when the system clock is insane
Theodore Ts'o [Mon, 13 Mar 2006 04:25:15 +0000 (23:25 -0500)]
Fix blkid's last verification logic to work when the system clock is insane

Users have reported problems on newly installed systems when the
Macintosh's system clock battery is dead and the hardware clock is
returning a date of 1904.  Turns out there were some bugs in handling
dates before the Unix epoch.

Addresses Red Hat Bug: #182188

probe.c (blkid_verify): Fix the bid_time sanity checking logic,
so that if last verification time is more recent than the
current time, or the comparison between the last
verification time and the current time causes an overflow,
a device verification will take place.

devname.c (blkid_get_dev): Set the initial bid_time to be
INT_MIN, to guarantee that blkid_verify will always be run
even when the system clock is insane.

dev.c (blkid_debug_dump_dev), read.c (debug_dump_dev),
save.c (save_dev): Fix the printf format for dev->bid_time
to match the fact that it is an signed type.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoFix the subdirs logic so it works with GNU make 3.80
Theodore Ts'o [Sat, 11 Mar 2006 02:39:40 +0000 (21:39 -0500)]
Fix the subdirs logic so it works with GNU make 3.80

The previous fix which fixed the problem with GNU make 3.81 building
all of the library object files caused GNU make 3.80 fail because the
subdirectories (such as elfshared) were not getting created.  This fix
should allow the Makefiles to work with both GNU make 3.80 and GNU
make 3.81.

18 years agoAdd EXT_JOURNAL to the blkid tag of ext3 filesystems.
Theodore Ts'o [Fri, 10 Mar 2006 23:11:35 +0000 (18:11 -0500)]
Add EXT_JOURNAL to the blkid tag of ext3 filesystems.

If the filesystem has an external journal, store the UUID of the
external journal in the tag EXT_JOURNAL.

If the filesystem type has changed, clear all the tags on the device,
not just a preset list of LABEL, UUID, TYPE, and SEC_TYPE.

Fix a bug so that blkid_set_tag will work correctly when freeing a tag
when the input name parameter comes from the tag that we are freeing.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoEnhance e2fsck so it can fix external journal hint in the superblock
Theodore Ts'o [Fri, 10 Mar 2006 20:25:59 +0000 (15:25 -0500)]
Enhance e2fsck so it can fix external journal hint in the superblock

Check to see if the superblock hint for the external journal needs to
be updated, and if so, offer to update it.  (Addresses Debian Bug:
#355644)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoRemove e2fsck/malloc.h
Theodore Ts'o [Wed, 8 Mar 2006 23:25:30 +0000 (18:25 -0500)]
Remove e2fsck/malloc.h

(This was an artifact of the migration of the sources from BitKeeper
to Mercurial; mea culpa, mea maximum culpa --- Ted)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoFix debugfs's icheck to correctly report the owner of an EA block
Theodore Ts'o [Wed, 8 Mar 2006 23:22:06 +0000 (18:22 -0500)]
Fix debugfs's icheck to correctly report the owner of an EA block

Hello Ted,
here is a minor fixup with debugfs "icheck" finding a block in an EA.
It was reporting the inode number as one too low because it was set
after the EA check is done.

From: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoEnable devmapper patch for Debian
Theodore Ts'o [Wed, 8 Mar 2006 22:42:40 +0000 (17:42 -0500)]
Enable devmapper patch for Debian

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoAdd device-mapper support to the blkid library
Karel Zak [Wed, 8 Mar 2006 19:17:28 +0000 (14:17 -0500)]
Add device-mapper support to the blkid library

On systems where is multi-path storage device is problem with duplicated
filesystems. The solution is select "the best" device. This is possible
by device-mapper library.

Short quotation from RH bugzilla:

With my patch, all dm devices remains in libblkid cache.

Only the top level dm devices are given high priority
and more appropriate node names (i.e. /dev/mapper/*) are used.

For example, if we have linear mapped dm device "ov1" over
dm device "disk1p3" which is multipath mapped to /dev/sdd3 and /dev/sdh3:
  # dmsetup.static ls --tree
  ov1 (253:5) <-- /dev/mapper/ov1 or /dev/dm-5
   `-disk1p3 (253:4) <-- /dev/mapper/disk1p3 or /dev/dm-4
      `-disk1 (253:0)
         |- (8:112) <-- /dev/sdh
         `- (8:48) <-- /dev/sdd

Original version of blkid will show:
  # ./orig/blkid -t LABEL=mpdisk1p3 -l
  /dev/sdd3: LABEL="mpdisk1p3" ... TYPE="ext3"

With my patch, blkid will show:
  # ./deptree/blkid -t LABEL=mpdisk1p3 -l
  /dev/mapper/ov1: LABEL="mpdisk1p3" ... TYPE="ext3"

In blkid cache, all devices are listed:

  # ./orig/blkid -t LABEL=mpdisk1p3
  /dev/sdd3: LABEL="mpdisk1p3" ... TYPE="ext3"
  /dev/sdh3: LABEL="mpdisk1p3" ... TYPE="ext3"
  /dev/dm-4: LABEL="mpdisk1p3" ... TYPE="ext3"
  /dev/dm-5: LABEL="mpdisk1p3" ... TYPE="ext3"

  # ./deptree/blkid -t LABEL=mpdisk1p3
  /dev/mapper/ov1: LABEL="mpdisk1p3" ... TYPE="ext3"
  /dev/sdd3: LABEL="mpdisk1p3" ... TYPE="ext3"
  /dev/sdh3: LABEL="mpdisk1p3" ... TYPE="ext3"
  /dev/dm-4: LABEL="mpdisk1p3" ... TYPE="ext3"

For more details see discussion on:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=156324

Addresses Red Hat Bug: #156324

Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Peter Jones <pjones@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoUpdate Swedish translation
Theodore Ts'o [Mon, 20 Feb 2006 19:16:21 +0000 (14:16 -0500)]
Update Swedish translation

18 years agoAdd a config option which controls whether fs checks are skipped when on battery
Theodore Ts'o [Sun, 29 Jan 2006 10:15:36 +0000 (05:15 -0500)]
Add a config option which controls whether fs checks are skipped when on battery

Whether fs checks are skipped when the system is running on battery can be
controlled by the new e2fsck.conf option defer_check_on_battery (this option
defaults to TRUE).

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoPrint an explanation when skipping a check due being on battery
Theodore Ts'o [Sun, 29 Jan 2006 10:05:31 +0000 (05:05 -0500)]
Print an explanation when skipping a check due being on battery

On Sat, Jan 28, 2006 at 12:53:33PM -0600, Fredrick Knieper wrote:
> Package: e2fsprogs
> Version: 1.38+1.39-WIP-2005.12.31-1
>
> When running fsck at boot or when running e2fsck manually on a device,
> fsck will not check a filesystem based on the maximum mount count,
> unless a flag such as -f or -c is used to force the filesystem check.

What's happening is that when you run on battery, e2fsck will delay
running the filesystem check, on the assumption that it is better to
defer the check until some time in the future when your laptop is
running on AC mains again.  This deferral is not infinite, however; if
the number of mounts exceeds twice the max mount counts, or if the
interval between checks exceeds twice the check interval, e2fsck will
force the check even though you are on battery.

I've changed the sources to print a message to make this more clear.

Addresses Debian Bug: #350306

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoUpdate debian changelog for release.
Theodore Ts'o [Sat, 7 Jan 2006 02:41:49 +0000 (21:41 -0500)]
Update debian changelog for release.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoUpdate priorities and sections to match with Debian override file.
Theodore Ts'o [Sat, 7 Jan 2006 02:40:57 +0000 (21:40 -0500)]
Update priorities and sections to match with Debian override file.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoAdded tag E2FSPROGS-1.39-WIP-1231 for changeset b3e5c52c10907a4488ded00fca596487643bddc4
Theodore Ts'o [Sat, 7 Jan 2006 02:02:34 +0000 (21:02 -0500)]
Added tag E2FSPROGS-1.39-WIP-1231 for changeset b3e5c52c10907a4488ded00fca596487643bddc4

18 years agoUpdate Dutch, Polish, and Swedish translations.
Theodore Ts'o [Sat, 7 Jan 2006 01:44:13 +0000 (20:44 -0500)]
Update Dutch, Polish, and Swedish translations.

Addresses Debian Bug: #343149

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoSet FD_CLOEXEC on the /dev/random file descriptor used by libuuid
Theodore Ts'o [Fri, 6 Jan 2006 23:10:02 +0000 (18:10 -0500)]
Set FD_CLOEXEC on the /dev/random file descriptor used by libuuid

This avoids a fd leak across an execve() which was causing problems
for the LVM tools.

(Addresses Debian Bug: #345832)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoAdd support for quoted strings in tag and section names
Theodore Ts'o [Fri, 6 Jan 2006 20:04:39 +0000 (15:04 -0500)]
Add support for quoted strings in tag and section names

Also changed top-level section name parsing to ignore leading and
trailing whitespace.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoAdd support to the profile library for /etc/foo/conf.d style directories
Theodore Ts'o [Thu, 5 Jan 2006 08:56:19 +0000 (03:56 -0500)]
Add support to the profile library for /etc/foo/conf.d style directories

If a directory is passed to profile_init, then read all files which
match [0-9a-zA-Z]* in sort order.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoFix gcc -Wall warning in profile_helper.c
Theodore Ts'o [Thu, 5 Jan 2006 06:29:50 +0000 (01:29 -0500)]
Fix gcc -Wall warning in profile_helper.c

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoMore profile cleanups: remove prf_data_t data structure
Theodore Ts'o [Thu, 5 Jan 2006 06:23:48 +0000 (01:23 -0500)]
More profile cleanups: remove prf_data_t data structure

Eliminate the prf_data_t data structure and fold it back into
prof_file_t.  Eschew needless complexity!

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoEnhance profile library's parser to accept comments
Theodore Ts'o [Thu, 5 Jan 2006 05:47:34 +0000 (00:47 -0500)]
Enhance profile library's parser to accept comments

This also changes syntax accepted by the profile parser.  The value of
profile relations must not contain spaces unless it is quoted;
otherwise the parser will throw an error.  Previously something like
this was allowed:

[liboptions]
test = foo bar

Now, the relation must be in double quotes in order to be valid, i.e.,
"foo bar".

Comments are allowed anywhere and can be started with either a ';' or
a '#' character.  The only place where comments will not be intepreted
as beginning a comment is in a quoted string.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoAdd syntax error reporting to the profile library
Theodore Ts'o [Wed, 4 Jan 2006 15:32:16 +0000 (10:32 -0500)]
Add syntax error reporting to the profile library

E2fsck will now report syntax errors in /etc/e2fsck.conf intead of simply
ignoring the config file when there are errors.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoSimplify profile core functionality
Theodore Ts'o [Tue, 3 Jan 2006 03:04:41 +0000 (22:04 -0500)]
Simplify profile core functionality

Boil down and simplify profile.c, and move extra functionality that's
not needed into profile_helpers.c

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoClean up test driver program for profile.c and #ifdef unused static functions
Theodore Ts'o [Mon, 2 Jan 2006 17:25:03 +0000 (12:25 -0500)]
Clean up test driver program for profile.c and #ifdef unused static functions

Unified batchmode and command-line handling.

profile_is_node_final() and profile_find_node_relation() are static,
unused functions.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoFix profile.c so that com_err.h doesn't have to be installed E2FSPROGS-1.39-WIP-1231
Theodore Ts'o [Mon, 2 Jan 2006 02:31:45 +0000 (21:31 -0500)]
Fix profile.c so that com_err.h doesn't have to be installed

Fix #include of com_err.h so that it isn't required that the com_err
development environment be installed.  (Addresses Debian Bug: #345519)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoUpdate version file for 1.39-WIP-1231 release.
Theodore Ts'o [Sat, 31 Dec 2005 21:46:46 +0000 (16:46 -0500)]
Update version file for 1.39-WIP-1231 release.

18 years agoUpdate e2fsprogs's internationalization files.
Theodore Ts'o [Sat, 31 Dec 2005 21:46:15 +0000 (16:46 -0500)]
Update e2fsprogs's internationalization files.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoUpdate release notes
Theodore Ts'o [Sat, 31 Dec 2005 21:45:29 +0000 (16:45 -0500)]
Update release notes

18 years agoAdd e2fsck problem handling to be configurable
Theodore Ts'o [Sat, 31 Dec 2005 21:33:33 +0000 (16:33 -0500)]
Add e2fsck problem handling to be configurable

Add the ability for the e2fsck configuration file to override the
behaviour of e2fsck when a particular filesystem problem is
encountered.  This allows reconnecting an inode to lost+found to not
stop the boot sequence, if a system administrator really badly wants
this behaviour for some specialized reason, for example.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoSlim down profile.c
Theodore Ts'o [Sat, 31 Dec 2005 21:24:07 +0000 (16:24 -0500)]
Slim down profile.c

#ifdef out functions not needed by e2fsck.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoAdd E2FSCK_CONFIG environment variable
Theodore Ts'o [Sat, 31 Dec 2005 21:21:00 +0000 (16:21 -0500)]
Add E2FSCK_CONFIG environment variable

Also, use this environtment variable to make sure that a local
/etc/e2fsck.conf file will not interfere with the regression test
suite.

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