Commit Graph

3141 Commits (ad751f11ecab50ec78a4b50ae95af3e7b2c4f06a)

Author SHA1 Message Date
Andreas Dilger ad751f11ec e2freefrag: Improve output to include be more like xfs_db's freesp -s
Signed-off-by: Andreas Dilger <adilger@sun.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-07-24 18:33:46 -04:00
Gran Uddeborg f668c2cfe8 po: update sv.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2009-07-24 10:28:43 -04:00
Theodore Ts'o 0b2681f45b 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>
2009-07-22 03:40:58 -04:00
Theodore Ts'o 1451c20109 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>
2009-07-22 02:38:16 -04:00
Theodore Ts'o 776a374a57 Update debian changelog and RELEASE-NOTES for interim release 2009-07-20 09:43:50 -04:00
Theodore Ts'o 8b5ed492de 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>
2009-07-19 23:37:44 -04:00
Theodore Ts'o 64cb68b3ea 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>
2009-07-19 23:32:09 -04:00
Theodore Ts'o 16e470e650 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>
2009-07-19 22:43:33 -04:00
Theodore Ts'o 95f65c3d70 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>
2009-07-19 07:15:43 -04:00
Theodore Ts'o d0c537748d mke2fs: Add strings.h include for strcasecmp() declaration
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-07-18 18:41:51 -04:00
Scott James Remnant 1e69a24005 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>
2009-07-18 18:21:56 -04:00
Matthias Andree bb3875e106 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>
2009-07-18 18:21:56 -04:00
Matthias Andree 98a5ad6147 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>
2009-07-18 18:21:46 -04:00
Theodore Ts'o 9922c53a4d 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>
2009-07-18 10:02:41 -04:00
Eric Sandeen bbbb81c1d9 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>
2009-07-18 09:56:10 -04:00
Theodore Ts'o 26ea4899d1 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>
2009-07-16 23:44:50 -04:00
Theodore Ts'o 25c7e0c304 libext2fs: Fix minor gcc -Wall warnings
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-07-12 01:13:06 -04:00
Theodore Ts'o 3c77b8ec54 Fix miscellaneous gcc -Wall warnings in blkid and tune2fs
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-07-11 23:56:49 -04:00
Theodore Ts'o 9d4bade4ac 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>
2009-07-11 23:44:56 -04:00
Theodore Ts'o 42080a8656 debugfs: Fix miscellaneous gcc -Wall warnings
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-07-11 23:23:16 -04:00
Theodore Ts'o 73910668ef 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>
2009-07-11 19:48:48 -04:00
Theodore Ts'o c179bca980 Update date in the RELEASE-NOTES file.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-07-11 19:21:43 -04:00
Theodore Ts'o 989a01f8e2 Update release notes, version string, etc. for E2fsprogs 1.41.8 release
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-07-11 18:29:56 -04:00
Theodore Ts'o cf268fd484 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>
2009-07-11 17:41:07 -04:00
Theodore Ts'o be6b924116 debian: Update standards version to 3.8.2
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-07-11 17:22:16 -04:00
Theodore Ts'o e2193cf4d2 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>
2009-07-11 16:22:51 -04:00
Theodore Ts'o 90075df530 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>
2009-07-11 16:05:39 -04:00
Arif E. Nugroho 4fd0e654a6 po: update id.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2009-07-11 14:36:16 -04:00
Theodore Ts'o 96cdb37e27 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>
2009-07-11 14:16:39 -04:00
Theodore Ts'o 0dc2916112 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>
2009-07-10 19:51:43 -04:00
Theodore Ts'o ef1a526dfb 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>
2009-07-09 14:32:52 -04:00
Theodore Ts'o 24a24cc628 Interim in-progress update of the release notes and debian/changelog
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-07-09 08:09:58 -04:00
Gran Uddeborg 8e4addbcd5 po: update sv.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2009-07-09 08:05:12 -04:00
Eric Sandeen 4bd87f2290 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>
2009-07-07 23:24:09 -04:00
Kazuya Mio e31b32721d 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>
2009-07-06 23:24:18 -04:00
Kazuya Mio 01ec1268a5 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>
2009-07-06 23:24:18 -04:00
Kazuya Mio f27aea2fba 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>
2009-07-06 23:24:18 -04:00
Theodore Ts'o bcb915b0d0 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>
2009-07-02 18:19:10 -04:00
Theodore Ts'o 3a4d9869d4 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>
2009-07-02 13:54:22 -04:00
Theodore Ts'o 7ad8da3649 Add e2croncheck script to the contrib directory
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-07-02 11:45:26 -04:00
Samuel Thibault 6c0d548b05 po: update fr.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2009-07-02 11:04:52 -04:00
Petr Pisar d4adea579c po: update cs.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2009-07-02 11:04:51 -04:00
Peng Tao f97ea10fde 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>
2009-07-02 00:24:15 -04:00
Peng Tao ca4d95a932 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>
2009-07-02 00:16:52 -04:00
Theodore Ts'o c13351f6c5 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>
2009-07-02 00:11:17 -04:00
Theodore Ts'o a6a1c0815c 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>
2009-07-01 22:06:51 -04:00
Jakub Bogusz dd6d671b86 po: update pl.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2009-07-01 21:32:26 -04:00
Theodore Ts'o 4a1e15a8ba 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>
2009-07-01 17:20:24 -04:00
Theodore Ts'o 4b76dfb123 Update Czech translation of e2fsprogs 2009-07-01 11:02:08 -04:00
Theodore Ts'o 3381a63c54 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>
2009-06-30 22:36:28 -04:00