Commit Graph

1925 Commits (69e59c225b90a16cd465d7b74341e2304646f83e)

Author SHA1 Message Date
Theodore Ts'o 69e59c225b Update TODO to remove item which is already completed. 2006-05-13 09:28:04 -04:00
Theodore Ts'o f63978aff7 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>
2006-05-13 09:25:47 -04:00
Theodore Ts'o 7eef874831 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>
2006-05-13 09:05:01 -04:00
Theodore Ts'o bc2699f018 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>
2006-05-13 08:46:37 -04:00
Theodore Ts'o f5fa20078b 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>
2006-05-08 20:17:26 -04:00
Theodore Ts'o 49c6b4e947 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>
2006-04-27 20:59:42 -04:00
Theodore Ts'o 1f2da2c011 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>
2006-04-23 12:43:40 -04:00
Theodore Ts'o 40198dd0bb 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>
2006-04-22 04:49:09 -04:00
Theodore Ts'o b116e781f6 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>
2006-04-22 04:32:36 -04:00
Theodore Ts'o 7aea126e85 Added tag E2FSPROGS-1.39-WIP-0409 for changeset a89eec026fc32ca7da786fbe3f76d892b6badb23 2006-04-22 04:29:41 -04:00
Theodore Ts'o 7e2ec0110f Update for e2fsprogs-1.39-WIP-0409 release
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-04-22 04:29:16 -04:00
Theodore Ts'o a99d4901ba Update config.guess and config.sub to latest version (2006-02-23) from FSF
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-04-09 18:37:22 -04:00
Theodore Ts'o 52cebe284b Update French, Dutch, Polish, Swedish, and Turkish translations.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-04-09 18:33:22 -04:00
Theodore Ts'o 4ea7ea007b 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>
2006-04-09 08:41:55 -04:00
Theodore Ts'o cef2ac104d 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>
2006-04-04 19:23:41 -04:00
Theodore Ts'o a8a8da76ac 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>
2006-04-02 10:04:36 -04:00
Theodore Ts'o 1ce0683fec Added tag E2FSPROGS-1.39-WIP-0330 for changeset cc5d09c487b27487925fb34d8ccd50a19e801ec4 2006-03-30 01:06:49 -05:00
Theodore Ts'o a0010281f1 Debian build: remove conffile from e2fsprogs-udeb, and remove explicit conffile
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-03-30 01:03:17 -05:00
Theodore Ts'o 34a2611c66 Update release notes and version.h for 1.39-WIP-2006-03-29 release
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-03-29 20:40:23 -05:00
Theodore Ts'o 1cbf82850c Update French translation and update PO template file.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-03-29 20:39:40 -05:00
Theodore Ts'o 7512f13662 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>
2006-03-29 19:03:38 -05:00
Theodore Ts'o 8ad26b08fa 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>
2006-03-29 14:23:00 -05:00
Theodore Ts'o 6515a6f1bc Enhance dumpe2fs to print the size of journal
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-03-29 14:03:07 -05:00
Theodore Ts'o d3cb5e52ef Fix typo's in badblocks(8)'s man page.
Addresses Debian Bug: #357951

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-03-27 12:16:30 -05:00
Theodore Ts'o cd84823aed 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>
2006-03-27 12:10:07 -05:00
Theodore Ts'o 3024d887df 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>
2006-03-27 11:53:00 -05:00
Theodore Ts'o 4719d25b69 Update the debian build files to deal with /etc/mke2fs.conf
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-03-27 01:11:06 -05:00
Theodore Ts'o 917cb46946 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>
2006-03-27 01:10:17 -05:00
Theodore Ts'o fac9525e2f 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>
2006-03-27 01:05:26 -05:00
Theodore Ts'o 1abdba4b64 Add man page documenting the /etc/e2fsck.conf configuration file.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-03-27 01:03:11 -05:00
Theodore Ts'o f9bcce3be0 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>
2006-03-25 13:42:45 -05:00
Theodore Ts'o 292811f2aa 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>
2006-03-25 01:42:02 -05:00
Theodore Ts'o fcadc8c84c 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>
2006-03-23 22:37:02 -05:00
Theodore Ts'o 2858c94e35 Fix file descriptor leak in blkid library in error paths
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-03-23 22:14:54 -05:00
Theodore Ts'o 9dc6ad1ecb Change mke2fs to use /etc/mke2fs.conf as a configuration file
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-03-23 22:00:01 -05:00
Theodore Ts'o 204ae371ad 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>
2006-03-22 10:01:24 -05:00
Theodore Ts'o f4f425b20b 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>
2006-03-19 15:26:26 -05:00
Takashi Sato 8deb80a5d1 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>
2006-03-18 21:43:46 -05:00
Theodore Ts'o 5d2ef12f6e 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>
2006-03-18 20:03:47 -05:00
Theodore Ts'o 616059bf23 Change mke2fs to create filesystems with the device opened in exclusive mode.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-03-18 20:02:05 -05:00
Theodore Ts'o 2e14e0c8cc 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>
2006-03-18 20:01:09 -05:00
Theodore Ts'o 98eb44bdb5 Add an option to debugfs to open filesystems in exclusive mode
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-03-18 19:58:13 -05:00
Theodore Ts'o 39c47ce641 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>
2006-03-18 19:16:10 -05:00
Theodore Ts'o fa6c653ec3 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>
2006-03-18 18:57:44 -05:00
Theodore Ts'o 7447921dff Fix documentation: BLOCK_FLAG_TRAVERSE should be BLOCK_FLAG_DEPTH_TRAVERSE
Addresses Debian Bug #351268

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-03-18 08:26:36 -05:00
Theodore Ts'o cbb7f9c4f1 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>
2006-03-17 21:59:13 -05:00
Theodore Ts'o 59571a51d7 Document the resize_inode filesystem option in mke2fs man page
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-03-17 21:03:27 -05:00
Theodore Ts'o a612f3432e 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>
2006-03-17 20:39:52 -05:00
Theodore Ts'o bf69235ad0 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>
2006-03-17 19:45:45 -05:00
Theodore Ts'o e324b25059 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>
2006-03-12 23:25:15 -05:00