Whamcloud - gitweb
tools/e2fsprogs.git
15 years agopo: update sv.po (from translationproject.org)
Göran Uddeborg [Fri, 24 Jul 2009 14:28:43 +0000 (10:28 -0400)]
po: update sv.po (from translationproject.org)

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
15 years agoe2freefrag: New program which displays how fragmented the free space is
Theodore Ts'o [Wed, 22 Jul 2009 07:40:58 +0000 (03:40 -0400)]
e2freefrag: New program which displays how fragmented the free space is

Signed-off-by: Andreas Dilger <adilger@sun.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agolibext2fs: Use blk_t instead of int in ext2fs_allocate_group_table
Theodore Ts'o [Wed, 22 Jul 2009 06:38:16 +0000 (02:38 -0400)]
libext2fs: Use blk_t instead of int in ext2fs_allocate_group_table

We are using a signed int to store a block number in
ext2fs_allocate_group_table.  We don't actually do any computation or
comparisons using it, so it shouldn't cause any bugs, but it's
technically incorrect, and it's possible an overly clever compiler
might do something wrong with it.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoUpdate debian changelog and RELEASE-NOTES for interim release
Theodore Ts'o [Mon, 20 Jul 2009 13:40:46 +0000 (09:40 -0400)]
Update debian changelog and RELEASE-NOTES for interim release

15 years agolibext2fs: Avoid creating unneeded new extents in ext2fs_extent_set_bmap()
Theodore Ts'o [Mon, 20 Jul 2009 03:37:44 +0000 (23:37 -0400)]
libext2fs: Avoid creating unneeded new extents in ext2fs_extent_set_bmap()

Avoiding inserting a new extent if it is possible to merge the new
block to the beginning or the end of the previous or next extent.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agolibext2fs: Improve debugging printf's in extent.c
Theodore Ts'o [Mon, 20 Jul 2009 03:32:09 +0000 (23:32 -0400)]
libext2fs: Improve debugging printf's in extent.c

Comment out less common debugging printf's, and fix some type
warnings.  Add high-level debugging printf's for ext2fs_extent_goto(),
ext2fs_extent_insert(), ext2fs_extent_delete(), ext2fs_extent_replace()

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agolibext2fs: Fix regression in ext2fs_extent_set_bmap()
Theodore Ts'o [Mon, 20 Jul 2009 02:43:33 +0000 (22:43 -0400)]
libext2fs: Fix regression in ext2fs_extent_set_bmap()

Commit 0dc291611 introduced a regression when unmapping the first
block in an extent.  This caused e2fsck -fD to corrupt large
directories if the directory has to shrink by more than one block.
The problem was set_bmap should only go to a next leaf when setting a
first block in an extent, and not when it is unmapping the first block
in an extent.

Addresses-Debian-Bug: #537510

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agodebian: Allow building with util-linux-ng
Theodore Ts'o [Sun, 19 Jul 2009 02:14:58 +0000 (22:14 -0400)]
debian: Allow building with util-linux-ng

If building with util-linux-ng, we will use the external libblkid and
libuuid, as well as disabling the internal fsck.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agomke2fs: Add strings.h include for strcasecmp() declaration
Theodore Ts'o [Sat, 18 Jul 2009 22:41:51 +0000 (18:41 -0400)]
mke2fs: Add strings.h include for strcasecmp() declaration

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agodebian/control: fix incorrect use of apostrophe's
Scott James Remnant [Wed, 15 Jul 2009 14:43:21 +0000 (15:43 +0100)]
debian/control: fix incorrect use of apostrophe's

Signed-off-by: Scott James Remnant <scott@ubuntu.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
15 years agoFix release date, to silence configure complaints
Matthias Andree [Wed, 15 Jul 2009 15:37:53 +0000 (17:37 +0200)]
Fix release date, to silence configure complaints

Signed-off-by: Matthias Andree <matthias.andree@gmx.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
15 years agoFix intl/ build: add E/Q/V macros, process intl/libgnuintl.h
Matthias Andree [Wed, 15 Jul 2009 15:37:52 +0000 (17:37 +0200)]
Fix intl/ build: add E/Q/V macros, process intl/libgnuintl.h

These were found necessary to build on FreeBSD 6.4.

Signed-off-by: Matthias Andree <matthias.andree@gmx.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
15 years agolibext2fs: fix memory leak in error path in ext2fs_block_iterate2()
Theodore Ts'o [Sat, 18 Jul 2009 14:02:41 +0000 (10:02 -0400)]
libext2fs: fix memory leak in error path in ext2fs_block_iterate2()

Reported-by: Nic Case <number9652@yahoo.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agofilefrag: fix it so it works in the bmap fallback case.
Eric Sandeen [Wed, 15 Jul 2009 20:22:55 +0000 (15:22 -0500)]
filefrag: fix it so it works in the bmap fallback case.

It looks like some debugging crept in?

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
15 years agoe2fsck: Fix superblock times in the future even if buggy_init_scripts=1
Theodore Ts'o [Fri, 17 Jul 2009 03:44:50 +0000 (23:44 -0400)]
e2fsck: Fix superblock times in the future even if buggy_init_scripts=1

Unfortunately, distributions like Ubuntu seem to have buggy init
scripts that run e2fsck and mount the root filesystem before making
sure the system time and time zone is correctly set.  As a result, a
filesystem's last write and last mounted time can be set in future.
The buggy_init_scripts configuration option will stop e2fsck from
aborting the boot process, but it also inhibits the superblock times
from getting fixed.  This causes resize2fs to refuse to resize the
filesystem, even after running e2fsck on the file system.  To deal
with this, we need to fix the superblock write times unconditionally.

Addresses-Launchpad-bug: #373409

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agolibext2fs: Fix minor gcc -Wall warnings
Theodore Ts'o [Sun, 12 Jul 2009 05:13:06 +0000 (01:13 -0400)]
libext2fs: Fix minor gcc -Wall warnings

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoFix miscellaneous gcc -Wall warnings in blkid and tune2fs
Theodore Ts'o [Sun, 12 Jul 2009 03:56:49 +0000 (23:56 -0400)]
Fix miscellaneous gcc -Wall warnings in blkid and tune2fs

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agofilefrag: Restore "perfect" number of extents calculation for ext2/ext3
Theodore Ts'o [Sun, 12 Jul 2009 03:44:56 +0000 (23:44 -0400)]
filefrag: Restore "perfect" number of extents calculation for ext2/ext3

The FIEMAP support added in e2fsprogs 1.41.6 broke the "perfection
would be XXX expects" calculation restore it.

Also fix some gcc -Wall warnings as well.  (Cleaning up gcc -Wall is
what caused me to notice this regression).

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agodebugfs: Fix miscellaneous gcc -Wall warnings
Theodore Ts'o [Sun, 12 Jul 2009 03:23:16 +0000 (23:23 -0400)]
debugfs: Fix miscellaneous gcc -Wall warnings

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agodebian: Don't use dietlibc when building for mips and mipsel
Theodore Ts'o [Sat, 11 Jul 2009 23:48:48 +0000 (19:48 -0400)]
debian: Don't use dietlibc when building for mips and mipsel

Dietlibc seems to fail when building e2fsprogs for the mips and mipsel
architectures.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoUpdate date in the RELEASE-NOTES file.
Theodore Ts'o [Sat, 11 Jul 2009 23:21:43 +0000 (19:21 -0400)]
Update date in the RELEASE-NOTES file.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoUpdate release notes, version string, etc. for E2fsprogs 1.41.8 release v1.41.8
Theodore Ts'o [Sat, 11 Jul 2009 22:29:56 +0000 (18:29 -0400)]
Update release notes, version string, etc. for E2fsprogs 1.41.8 release

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoRemove tst_csum.c from lib/ext2fs/Makefile.in's SRCS list
Theodore Ts'o [Sat, 11 Jul 2009 21:41:07 +0000 (17:41 -0400)]
Remove tst_csum.c from lib/ext2fs/Makefile.in's SRCS list

The tst_csum test is now part of csum.c, so there isn't a separate
tst_csum.c file that should be listed as one of the source files in
lib/ext2fs.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agodebian: Update standards version to 3.8.2
Theodore Ts'o [Sat, 11 Jul 2009 21:22:16 +0000 (17:22 -0400)]
debian: Update standards version to 3.8.2

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoUpdate the sample e2fsprogs.spec.in RPM spec file to mention ext3/ext4
Theodore Ts'o [Sat, 11 Jul 2009 20:22:51 +0000 (16:22 -0400)]
Update the sample e2fsprogs.spec.in RPM spec file to mention ext3/ext4

Update the description to indicate the e2fsprogs packages are also
used for ext3 and ext4 filesystems.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agodebian: Update package descriptions to mention ext3/ext4 filesystems
Theodore Ts'o [Sat, 11 Jul 2009 20:05:39 +0000 (16:05 -0400)]
debian: Update package descriptions to mention ext3/ext4 filesystems

E2fsprogs is used for ext2, ext3, and ext4 filesystems.  Update the
package descriptions accordingly:

Addresses-Debian-Bug: #535530

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agopo: update id.po (from translationproject.org)
Arif E. Nugroho [Sat, 11 Jul 2009 18:36:16 +0000 (14:36 -0400)]
po: update id.po (from translationproject.org)

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
15 years agoresize2fs: If resize2fs fails, tell the user to run e2fsck
Theodore Ts'o [Fri, 10 Jul 2009 17:14:00 +0000 (13:14 -0400)]
resize2fs: If resize2fs fails, tell the user to run e2fsck

If the resize operation fails in the middle of the operation, mark the
filesystem as needing to be checked, and tell the user that they
should run e2fsck -fy on the device.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agolibext2fs: Make ext2fs_extent_set_bmap() more robust against ENOSPC
Theodore Ts'o [Fri, 10 Jul 2009 04:19:28 +0000 (00:19 -0400)]
libext2fs: Make ext2fs_extent_set_bmap() more robust against ENOSPC

In the case where we ext2fs_extent_set_bmap() is replacing the block
mapping at the beginning of an already-existing extent, insert a new
extent if necessary before shrinking an existing extent, to avoid data
loss if the disk is full.

This mostly addresses the problem described in Red Hat Bugzilla's
statistics are still wrong, but at least the files on the filesystem
are not corrupted.  If there is a failure during the
inode_scan_and_fix pass, the simplest thing to do may be to tell the
user to run e2fsck -fy.

Addresses-Red-Hat-Bug: #510379

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agolibext2fs: Add new function ext2fs_test_inode_bitmap_range()
Theodore Ts'o [Thu, 9 Jul 2009 18:32:52 +0000 (14:32 -0400)]
libext2fs: Add new function ext2fs_test_inode_bitmap_range()

Optimize ext2fs_test_block_bitmap_range() and add a new function,
ext2fs_test_inode_bitmap_range(), which works the same way as
ext2fs_block_bitmap_range() but for inode bitmaps.  It's needed for
some code in the development branch, so let's drop it into the maint
branch to make life easier in the future.

Signed-off-by: Kazuya Mio <k-mio@sx.jp.nec.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoInterim in-progress update of the release notes and debian/changelog
Theodore Ts'o [Thu, 9 Jul 2009 12:09:58 +0000 (08:09 -0400)]
Interim in-progress update of the release notes and debian/changelog

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agopo: update sv.po (from translationproject.org)
Göran Uddeborg [Thu, 9 Jul 2009 12:05:12 +0000 (08:05 -0400)]
po: update sv.po (from translationproject.org)

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
15 years agolibext2fs: reset handle after inserting new extent
Eric Sandeen [Tue, 7 Jul 2009 19:30:32 +0000 (14:30 -0500)]
libext2fs: reset handle after inserting new extent

Commit 53422e moved the new extent insertion in
ext2fs_extent_set_bmap() prior to the modification of the original
extent, but the insert function left the handle pointing to the new
extent.  This left us modifying the -new- extent, instead of the
original one, and winding up with a corrupt extent tree something
like:

BLOCKS:
(0-1):588791-588792, (0):588791

We need to move back to the previous extent prior
to modification, if we inserted a new one.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
15 years agoe2fsck: remove unused variable in check_block_bitmap()
Kazuya Mio [Mon, 6 Jul 2009 08:16:32 +0000 (17:16 +0900)]
e2fsck: remove unused variable in check_block_bitmap()

check_block_bitmap() calculates the block number of superblock in the current
block group but it's not used.

Signed-off-by: Kazuya Mio <k-mio@sx.jp.nec.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
15 years agoe2fsck: optimize loop counter when fixing bitmap padding
Kazuya Mio [Mon, 6 Jul 2009 08:15:24 +0000 (17:15 +0900)]
e2fsck: optimize loop counter when fixing bitmap padding

If unused range of the bitmap has an unmarked bit, check_[inode/block]_end()
marks all bits in the range. However, we know that the checked bits are marked.
So this patch fixes loop counter to mark from the unmarked bit.

Signed-off-by: Kazuya Mio <k-mio@sx.jp.nec.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
15 years agoe2fsck: remove unnecessary continue statement
Kazuya Mio [Mon, 6 Jul 2009 08:14:13 +0000 (17:14 +0900)]
e2fsck: remove unnecessary continue statement

Remove the continue statement because it calls at the end of the loop.

Signed-off-by: Kazuya Mio <k-mio@sx.jp.nec.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
15 years agoEnhance build system so that "make V=1" works like the Linux Kernel
Theodore Ts'o [Thu, 2 Jul 2009 22:19:10 +0000 (18:19 -0400)]
Enhance build system so that "make V=1" works like the Linux Kernel

If gmake is available, the developer can use "make V=1" instead of
using a configure-time switch, --enable-verbose-makecmds, to see all
of the commands executed by the Makefile.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoresize2fs: Fix error message so the mountpoint is printed correctly
Theodore Ts'o [Thu, 2 Jul 2009 17:54:22 +0000 (13:54 -0400)]
resize2fs: Fix error message so the mountpoint is printed correctly

The resize2fs program was freeing the mountpoint information too
early, so garbage was getting printed instead of the correct
information in an error message.

Addresses-Debian-Bug: #535452

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoAdd e2croncheck script to the contrib directory
Theodore Ts'o [Thu, 2 Jul 2009 15:39:23 +0000 (11:39 -0400)]
Add e2croncheck script to the contrib directory

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agopo: update fr.po (from translationproject.org)
Samuel Thibault [Thu, 2 Jul 2009 15:04:52 +0000 (11:04 -0400)]
po: update fr.po (from translationproject.org)

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
15 years agopo: update cs.po (from translationproject.org)
Petr Pisar [Thu, 2 Jul 2009 15:04:51 +0000 (11:04 -0400)]
po: update cs.po (from translationproject.org)

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
15 years agofilefrag: fix fm_start in filefrag_fiemap loop
Peng Tao [Thu, 2 Jul 2009 04:24:15 +0000 (00:24 -0400)]
filefrag: fix fm_start in filefrag_fiemap loop

When used with -v and the targeted file has more than 144
extents(double of the length of fm_extents array provided by buf),
filefrag_fiemap loops and calls fiemap ioctl() multiple times to
calculate the actual number of extents in a file. Each call to fiemap
ioctl() uses fm_start as the starting logical offset. The patch fixes
fm_start in each loop( except for the first one) and makes the extent
calculation correct for files with more that 144 extents.

To produce the problem, first run filefrag -v on a highly fragmented
file.  Then change the buf size in filefrag_fiemap to make it large
enough to have all the extent mapped in a single loop and run filefrag
-v after recompiling.  The former will produce a much smaller extent
count because of the false fm_start used in the loop. And the two will
produce different extent output since the 145th extent.

Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoremove bogus "-e" option from filefrag manpage
Peng Tao [Fri, 5 Jun 2009 10:13:28 +0000 (18:13 +0800)]
remove bogus "-e" option from filefrag manpage

filefrag doesn't support "-e" option, so clean it up in the manpage.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
15 years agoAdd support for configure --enable-verbose-makecmds
Theodore Ts'o [Thu, 2 Jul 2009 04:11:17 +0000 (00:11 -0400)]
Add support for configure --enable-verbose-makecmds

Some people don't want to see the concise "kernel-style" make output.
This configure option allows build engines that want to see the full
set of commands executed by the makefile to get what they want.  Most
people will find this more distracting than useful, unless they need
to debug the Makefiles.

(It is not necessary to rerun configure to enable this verbose make
output temprarily; if a developer wants to do a quick debug of a
directory's makefile, he or she can simply edit the definition of the
$(E) and $(Q) variables in the Makefile; instructions can be found in
the MCONFIG file which is included in at the beginning of every
Makefile.)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoFix Makefile dependencies for libcom_err
Theodore Ts'o [Thu, 2 Jul 2009 02:06:51 +0000 (22:06 -0400)]
Fix Makefile dependencies for libcom_err

The e2fsprogs makefiles were using the same Makefile variable
LIBCOM_ERR for the link-line arguments as well as the dependencies.
Since LIBCOM_ERR can now include non-file arguments such as
"-lpthread", we need to use a separate DEPLIBCOM_ERR variable that
only has build file dependencies.

Do the same thing for STATIC_LIBCOM_ERR and PROFILED_LIBCOM_ERR.

Addresses-Sourceforge-Patches: #2813809

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agopo: update pl.po (from translationproject.org)
Jakub Bogusz [Thu, 2 Jul 2009 01:32:26 +0000 (21:32 -0400)]
po: update pl.po (from translationproject.org)

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
15 years agoFix compilation problem when building with --disable-uuid
Theodore Ts'o [Wed, 1 Jul 2009 21:20:24 +0000 (17:20 -0400)]
Fix compilation problem when building with --disable-uuid

The MCONFIG.in file used $(LIBUUID) in the definition of DEPLIBBLKID,
when it should have used $(DEPLIBUUID) instead.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoUpdate Czech translation of e2fsprogs
Theodore Ts'o [Wed, 1 Jul 2009 15:02:08 +0000 (11:02 -0400)]
Update Czech translation of e2fsprogs

15 years agolibuuid: Don't run uuidd if it would fail due to permission problems
Theodore Ts'o [Wed, 1 Jul 2009 02:36:28 +0000 (22:36 -0400)]
libuuid: Don't run uuidd if it would fail due to permission problems

Some distributions don't like installing uuidd setuid or setgid.  So
if the setuid or setigid bit is not set with uuidd, and the current
process does not have write access to the UUIDD work directory, don't
try running uuidd, since it won't work properly.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoDo not build and install uuidgen from if the uuid library was disabled.
Theodore Ts'o [Wed, 1 Jul 2009 01:34:08 +0000 (21:34 -0400)]
Do not build and install uuidgen from if the uuid library was disabled.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agolibuuid, uuidd: Avoid infinite loop while reading from the socket fd
Theodore Ts'o [Tue, 30 Jun 2009 00:03:20 +0000 (20:03 -0400)]
libuuid, uuidd: Avoid infinite loop while reading from the socket fd

If for some reason the uuidd daemon or the process calling uuidd
exited unexpectely, the read_all() function would end up looping
forever, either in uuidd or in libuuid.  Fix this terminating the loop
if no data can be read after five tries to read from the file
descriptor.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agouuidd: Avoid closing the server socket when calling create_daemon()
Theodore Ts'o [Mon, 29 Jun 2009 23:32:50 +0000 (19:32 -0400)]
uuidd: Avoid closing the server socket when calling create_daemon()

In the event that file descriptors 0-2 are closed when uuidd is
started, the server socket could be created as a file descriptor that
will get closed when create_daemon() tries detaching the uuidd daemon
from its controlling tty.   Avoid this case by using dup(2).

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agolibuuid: Make sure fd's 0, 1, and 2 are valid before exec'ing uuidd
Theodore Ts'o [Mon, 29 Jun 2009 23:06:45 +0000 (19:06 -0400)]
libuuid: Make sure fd's 0, 1, and 2 are valid before exec'ing uuidd

When closing all of the file descriptors before starting uuidd, make
sure file descriptors 0, 1, and 2 are reserved by opening /dev/null.
This prevents strange bugs caused by assumptions regarding file
descriptors <= 2 as being special.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoUpdate release notes, version string, etc. for E2fsprogs 1.41.7 release v1.41.7
Theodore Ts'o [Mon, 29 Jun 2009 16:56:04 +0000 (12:56 -0400)]
Update release notes, version string, etc. for E2fsprogs 1.41.7 release

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoUpdate Czech and Chinese translations from the Translation Project.
Theodore Ts'o [Mon, 29 Jun 2009 19:08:12 +0000 (15:08 -0400)]
Update Czech and Chinese translations from the Translation Project.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agologsave: Don't send the ^A and ^B delimiters to the console
Theodore Ts'o [Mon, 29 Jun 2009 18:58:07 +0000 (14:58 -0400)]
logsave: Don't send the ^A and ^B delimiters to the console

Some terminal programs may print wierd characters when they see the
\001 or \002 characters.  So filter them out if the -s option
(skip_mode) is enabled.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoUpdate e2fsprogs.pot file for 1.41.7 release
Theodore Ts'o [Mon, 29 Jun 2009 05:30:30 +0000 (01:30 -0400)]
Update e2fsprogs.pot file for 1.41.7 release

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agolibext2fs: ensure validate_entry doesn't read beyond blocksize
Nic Case [Mon, 29 Jun 2009 05:24:40 +0000 (01:24 -0400)]
libext2fs: ensure validate_entry doesn't read beyond blocksize

ext2fs_validate_entry would read beyond the end of the block to get
dirent->rec_len for certain arguments (like if blocksize ==
final_offset).  This patch adds a check so that doesn't happen, and
changes the types of the arguments to avoid a compiler warning.

Signed-off-by: Nic Case <number9652@yahoo.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agodebugfs: don't try to fclose NULL
Eric Sandeen [Fri, 26 Jun 2009 18:57:39 +0000 (13:57 -0500)]
debugfs: don't try to fclose NULL

do_logdump may jump to errout if fopen(out_file) fails,
but in that case out_file is NULL, and fclose will segfault.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
15 years agobadblocks: Make sure the list of bad blocks found is flushed on interrupt
Theodore Ts'o [Mon, 29 Jun 2009 05:04:02 +0000 (01:04 -0400)]
badblocks: Make sure the list of bad blocks found is flushed on interrupt

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agobadblocks.8: Alphabetize options in badblocks man page
Theodore Ts'o [Mon, 29 Jun 2009 05:03:27 +0000 (01:03 -0400)]
badblocks.8: Alphabetize options in badblocks man page

... to make it easier to find a specific option in the man page.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agobadblocks.8: Update description of the -s option in badblocks man page
Theodore Ts'o [Mon, 29 Jun 2009 04:59:35 +0000 (00:59 -0400)]
badblocks.8: Update description of the -s option in badblocks man page

Addresses-Debian-Bug: #523063

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agobadblocks: Print the currently tested block number when interrupted with ^C
Theodore Ts'o [Mon, 29 Jun 2009 04:52:27 +0000 (00:52 -0400)]
badblocks: Print the currently tested block number when interrupted with ^C

This can be useful for the user who wishes to restart the badblocks
program after interrupting it.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoconfigure.in: add --disable-libuuid option
Scott James Remnant [Thu, 14 May 2009 12:03:25 +0000 (13:03 +0100)]
configure.in: add --disable-libuuid option

Add an option to switch between the private (in-tree) libuuid and
public (in-system installed) library.  The private version is still
enabled by default.

Signed-off-by: Scott James Remnant <scott@netsplit.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
15 years agolsattr: exit with a non-zero status on errors
Eric Sandeen [Thu, 18 Jun 2009 22:51:07 +0000 (17:51 -0500)]
lsattr: exit with a non-zero status on errors

lsattr doesn't return an error if you point it at a file that
doesn't exist.

This is slightly trickier because it can take more than one
file as an arg, but ls seems to report an error if any occurred,
so this does the same, it'll report the last error that was
encountered.

Addresses-RedHat-Bugzilla: #489841
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
15 years agoFix encoding for rec_len in directories for >= 64k blocksize file systems
Theodore Ts'o [Mon, 22 Jun 2009 01:07:38 +0000 (21:07 -0400)]
Fix encoding for rec_len in directories for >= 64k blocksize file systems

Previously e2fsprogs interpreted 0 for a rec_len of 65536 (which could
occur if the directory block is completely empty in 64k blocksize
filesystems), while the kernel interpreted 65535 to mean 65536.  The
kernel will accept both to mean 65536, and encodes 65535 to be 65536.
This commit changes e2fsprogs to match.

We add the encoding agreed upon for 128k and 256k filesystems, but we
don't enable support for these larger block sizes, since they haven't
been fully tested.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoresize2fs: update sb journal backup if journal was moved
Eric Sandeen [Thu, 18 Jun 2009 01:55:39 +0000 (20:55 -0500)]
resize2fs: update sb journal backup if journal was moved

This was reported in Fedora, since the livecd creator does
a lot of resizing.

If we've moved the journal blocks during resize (more likely now,
due to the journal being in the middle) the backup blocks in the
superblock don't get updated, and a subsequent e2fsck will find
issues:

e2fsck 1.41.6 (30-May-2009)
Backing up journal inode block information.

Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information

/mnt/test/img: ***** FILE SYSTEM WAS MODIFIED *****
/mnt/test/img: 11/16000 files (0.0% non-contiguous), 17789/38400 blocks

This can be shown in a simple test:

# dd if=/dev/zero of=img bs=1 count=0 seek=3000M
# mke2fs -t ext4 -F img
# resize2fs img 150M
# e2fsck -f img

(thanks to the Fedora reporter Mads Kiilerich for the testcase!
https://bugzilla.redhat.com/show_bug.cgi?id=506105#c2)

So, update the backup journal in the superblock before resize2fs exits.

Addresses-RedHat-Bugzilla: #505339

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agolibext2fs: initialize large inodes for journal & resize
Eric Sandeen [Wed, 17 Jun 2009 02:50:53 +0000 (21:50 -0500)]
libext2fs: initialize large inodes for journal & resize

I noticed that neither the journal nor resize inodes have
i_extra_isize set post-mkfs; while this isn't likely
to be a big problem, I think the below patch tidies
it up.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
15 years agolibext2fs: write only core inode in update_path()
Eric Sandeen [Wed, 17 Jun 2009 22:49:01 +0000 (18:49 -0400)]
libext2fs: write only core inode in update_path()

The ext2_extent_handle only has a struct ext2_inode allocated on
it, and the same amount copied into it in that same function,
but in update_path() we're possibly writing out more than that -
for example 256 bytes, from that address.  This causes uninitialized
memory to get  written to disk, overwriting the parts of the
inode past the osd2 member (the end of the smaller structure).

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agodumpe2fs, tune2fs: fix miscellaneous memory leaks
Theodore Ts'o [Mon, 15 Jun 2009 07:53:04 +0000 (03:53 -0400)]
dumpe2fs, tune2fs: fix miscellaneous memory leaks

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agodebugfs: Fix miscellaneous memory leaks
Theodore Ts'o [Mon, 15 Jun 2009 07:52:30 +0000 (03:52 -0400)]
debugfs: Fix miscellaneous memory leaks

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoresize2fs: fix miscellaneous memory leaks
Theodore Ts'o [Mon, 15 Jun 2009 07:51:51 +0000 (03:51 -0400)]
resize2fs: fix miscellaneous memory leaks

Fix various memory leaks which were discovered using valgrind.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoe2fsck: fix miscellaneous memory leaks
Theodore Ts'o [Mon, 15 Jun 2009 07:50:07 +0000 (03:50 -0400)]
e2fsck: fix miscellaneous memory leaks

Fix various miscellaneous memory leaks which were discovered using valgrind.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agolibext2fs: Fix memory leak in the extents handling function
Theodore Ts'o [Mon, 15 Jun 2009 05:34:43 +0000 (01:34 -0400)]
libext2fs: Fix memory leak in the extents handling function

Each time an extent handle is opened and closed, if the inode has an
extent tree which does not fit in the inode's i_block structure, a
filesystem block buffer was not getting released.  Since e2fsck opens
an extent handle for every inode using extents, this can translate to
a very large amount of memory getting lost.

Thanks to Henrik 'Mauritz' Johnson for discovering and pointing out
this leak, which he ran into while running the "rdump" command in
debugfs.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agotests: Add --valgrind-leakcheck option to the test_script program
Theodore Ts'o [Mon, 15 Jun 2009 05:33:26 +0000 (01:33 -0400)]
tests: Add --valgrind-leakcheck option to the test_script program

Add an option which runs valgrind with the appropriate options for
finding memory leaks.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agobadblocks: Remove 4096 blocksize limit
Theodore Ts'o [Tue, 2 Jun 2009 13:31:24 +0000 (09:31 -0400)]
badblocks: Remove 4096 blocksize limit

There is no need to prohibit the use of block sizes larger than 4k in
the badblocks program.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoFix spelling mistake in the man page for chattr
Theodore Ts'o [Tue, 2 Jun 2009 13:02:39 +0000 (09:02 -0400)]
Fix spelling mistake in the man page for chattr

Addresses-Debian-Bug: #531385

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agofilefrag: Fix error checking for the fiemap ioctl
Theodore Ts'o [Tue, 2 Jun 2009 12:45:22 +0000 (08:45 -0400)]
filefrag: Fix error checking for the fiemap ioctl

Thanks to Peng Tao for reporting this problem.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoUpdate release notes, version string, etc. for E2fsprogs 1.41.6 release v1.41.6
Theodore Ts'o [Sat, 30 May 2009 17:56:31 +0000 (13:56 -0400)]
Update release notes, version string, etc. for E2fsprogs 1.41.6 release

15 years agoUpdate translation file for 1.41.6 release
Theodore Ts'o [Sat, 30 May 2009 17:50:07 +0000 (13:50 -0400)]
Update translation file for 1.41.6 release

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoUpdate lib/xt2fs/Makefile.in using "make depend"
Theodore Ts'o [Sat, 30 May 2009 17:46:19 +0000 (13:46 -0400)]
Update lib/xt2fs/Makefile.in using "make depend"

15 years agoUpdate man pages to include ext4 in the synposis, instead of just "ext2/ext3"
Theodore Ts'o [Sat, 30 May 2009 16:34:28 +0000 (12:34 -0400)]
Update man pages to include ext4 in the synposis, instead of just "ext2/ext3"

The e2fsprogs programs have historically just said that they operate
on ext2 and ext3 file system in their man pages.  Update them to say
that they also operate on ext4 file systems.

Addresses-Launchpad-bug: #381854

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agodebian: Update control file to remove lintian warnings
Theodore Ts'o [Sat, 30 May 2009 14:23:05 +0000 (10:23 -0400)]
debian: Update control file to remove lintian warnings

* Update debian policy standards 3.8.1
* Expand short and extended descriptions
* Remove duplicated section and priority fields in the binary packages
* Remove empty depends: header

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agodebian: update e2fslibs.symbol file to add ext2fs_extent_open2@Base
Theodore Ts'o [Sat, 30 May 2009 14:22:12 +0000 (10:22 -0400)]
debian: update e2fslibs.symbol file to add ext2fs_extent_open2@Base

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agodebain: Remove unneeded lintian override
Theodore Ts'o [Sat, 30 May 2009 13:44:06 +0000 (09:44 -0400)]
debain: Remove unneeded lintian override

15 years agoRemove unused legacy .hgtags file from top-level directory
Theodore Ts'o [Sat, 30 May 2009 04:40:29 +0000 (00:40 -0400)]
Remove unused legacy .hgtags file from top-level directory

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agomke2fs.8: Fix man page to use hyphens instead of minus signs for options
Theodore Ts'o [Sat, 30 May 2009 04:15:22 +0000 (00:15 -0400)]
mke2fs.8: Fix man page to use hyphens instead of minus signs for options

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoUpdate config.guess and config.sub to the latest (2009-04-17) version
Theodore Ts'o [Sat, 30 May 2009 02:22:23 +0000 (22:22 -0400)]
Update config.guess and config.sub to the latest (2009-04-17) version

Addresses-Debian-Bug: #528330

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agolibext2fs: Move test code for csum.c inline instead of in a separate file
Theodore Ts'o [Fri, 29 May 2009 15:01:22 +0000 (11:01 -0400)]
libext2fs: Move test code for csum.c inline instead of in a separate file

Move the test code which is used to build the tst_csum progam from
tst_csum into csum.c under an #ifdef DEBUG to simplify things and to
avoid compile problems caused by not having a prototype for
ext2fs_group_desc_csum().

Addresses-Sourceforge-Bug: #2484331

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agolibext2fs: Add an explicit error code for missing mtab file
Theodore Ts'o [Fri, 29 May 2009 04:09:57 +0000 (00:09 -0400)]
libext2fs: Add an explicit error code for missing mtab file

To reduce user confusion, if the /etc/mtab file is missing
ext2fs_check_mount_point and ext2fs_check_if_mounted will return a
new, explicit error code to indicate this case.

Addresses-Debian-Bug: #527859

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoe2fsck: Go back to the original superblock if the backup sb is invalid
Theodore Ts'o [Fri, 29 May 2009 03:40:18 +0000 (23:40 -0400)]
e2fsck: Go back to the original superblock if the backup sb is invalid

In the case where the block group descriptors appear corrupt, e2fsck
will try to use the backup superblock.  However, it could be that the
backup superblock itself is completely corrupted, in which e2fsck
should go back to the original superblock instead of refusing to fix
the file system.

Addresses-Debian-Bug: #516820

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agodebugfs: Add -a option to close_filesys command
Theodore Ts'o [Fri, 29 May 2009 02:03:33 +0000 (22:03 -0400)]
debugfs: Add -a option to close_filesys command

Add an -a option to the close_filesys command which writes any changes
to the superblock or block group descriptors to all of the backup
superblock locations.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoe2fsck: if i_file_acl_hi is non-zero, fix it and don't abort e2fsck -p
Theodore Ts'o [Thu, 28 May 2009 21:05:40 +0000 (17:05 -0400)]
e2fsck: if i_file_acl_hi is non-zero, fix it and don't abort e2fsck -p

Ext3 filesystems don't care if i_file_acl_hi is non-zero in some
inode, and newer kernels should ignore this field (although 2.6.29 and
older kernels will not).  So e2fsck should fix this without aborting
an e2fsck preen operation.

Addresses-Debian-Bug: #526524

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agolibext2fs: add ext2fs_extent_open2
number9652 [Tue, 19 May 2009 20:34:12 +0000 (13:34 -0700)]
libext2fs: add ext2fs_extent_open2

The patch below adds a function, ext2fs_extent_open2(), that behaves
as ext2fs_extent_open(), but will use the user-supplied inode
structure when opening an extent instead of reading the inode from
disk.  It also changes several of the calls to extent_open() to use
this enhancement.

Signed-off-by: Nic Case <number9652@yahoo.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoAdd empty function for init_resource_track() and print_resource_track()
Ken Chen [Thu, 28 May 2009 13:55:10 +0000 (09:55 -0400)]
Add empty function for init_resource_track() and print_resource_track()
in the case of ! defined RESOURCE_TRACK, so that we can clean up #ifdef
throughout e2fsck source.

Signed-off-by: Ken Chen <kenchen@google.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoe2fsck: add resource tracking for passes 1[b-d]
Ken Chen [Tue, 5 May 2009 03:12:30 +0000 (20:12 -0700)]
e2fsck: add resource tracking for passes 1[b-d]

On ext2, time tracking for pass1 includes both error detection and
specific type of fs fix-up phase (e.g. block referenced by multiple
inodes).  The multi-reference fix-up phase some time take significant
amount of time to complete.  We would like to track time spent in sub
component of pass1 by having a finer granularity during pass1b through
pass1d phase.

Signed-off-by: Ken Chen <kenchen@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
15 years agochattr: manpage tidyups
Eric Sandeen [Thu, 28 May 2009 04:23:43 +0000 (23:23 -0500)]
chattr: manpage tidyups

Tidy up the chattr(1) manpage to completely document all
available options, and differentiate those which are read-only
early in the manpage as well.

* Remove "I" from settable attribute list
* add "e" to 2nd list of settable attributes & descriptions
* Note that h/E/I/X/Z are readonly
* Correct "H" to "h" for huge file attribute description
* fix long_name for indexed directory in flags_array

Addresses-Red-Hat-Bugzilla: BZ#502971

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
15 years agochattr: Add extent conversion support
Aneesh Kumar K.V [Tue, 6 Jan 2009 06:37:14 +0000 (12:07 +0530)]
chattr: Add extent conversion support

This patch adds new option, +e to chattr. The +e option
is used to convert the ext3 format (non extent) file
to ext4 (extent) format. This can be used to migrate
the ext3 file system to ext4 file system.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
15 years agoe2fsck: use unsigned values for memory tracking stats
Andreas Dilger [Thu, 28 May 2009 06:47:37 +0000 (00:47 -0600)]
e2fsck: use unsigned values for memory tracking stats

Use unsigned values for printing memory tracking to avoid overflows.
The mallinfo() data is currently signed ints, but it might change in
the future so we may as well compute/print unsigned longs.

Signed-off-by: Andreas Dilger <adilger@sun.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
15 years agoe2fsck: only restart e2fsck once for inodes in uninit range
Andreas Dilger [Thu, 28 May 2009 06:39:49 +0000 (00:39 -0600)]
e2fsck: only restart e2fsck once for inodes in uninit range

Restart e2fsck only once in case of multiple inodes in uninit range.
Display correct inode number during BG_INO_UNINIT and INOREF_IN_USED errors.

Signed-off-by: Kalpak Shah <kalpak.shah@sun.com>
Signed-off-by: Andreas Dilger <adilger@sun.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>