Whamcloud - gitweb
Valerie Aurora Henson [Sun, 23 Aug 2009 02:29:02 +0000 (22:29 -0400)]
e2fsck: Convert e2fsck to new bitmap interface
Signed-off-by: Valerie Aurora Henson <vaurora@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Valerie Aurora Henson [Wed, 5 Aug 2009 04:17:56 +0000 (00:17 -0400)]
Convert mke2fs to new bitmap interface
Signed-off-by: Valerie Aurora Henson <vaurora@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Valerie Aurora Henson [Wed, 5 Aug 2009 04:27:10 +0000 (00:27 -0400)]
Convert libext2fs to 64-bit bitmap interface
(Includes fixes from Nick Dokos)
Signed-off-by: Valerie Aurora Henson <vaurora@redhat.com>
Signed-off-by: Nick Dokos <nicholas.dokos@hp.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sat, 22 Aug 2009 17:27:40 +0000 (13:27 -0400)]
Add support for 64-bit bitmaps
Initial design was done by Theodore Ts'o; implementation was fleshed
out by Valerie Aurora Henson. Also includes some fixes from Nick Dokos.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Valerie Aurora Henson <vaurora@redhat.com>
Signed-off-by: Nick Dokos <nicholas.dokos@hp.com>
Valerie Aurora Henson [Wed, 5 Aug 2009 02:48:15 +0000 (22:48 -0400)]
e2fsck: Allow cancellation during group descriptor checks.
Signed-off-by: Valerie Aurora Henson <vaurora@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sat, 22 Aug 2009 17:18:29 +0000 (13:18 -0400)]
Merge branch 'maint' into next
Theodore Ts'o [Sat, 22 Aug 2009 17:16:14 +0000 (13:16 -0400)]
Move declaration of FS_IOC_FIEMAP ioctl to fiemap.h
This helps e4defrag compile on systems where the system header files
don't yet define FS_IOC_FIEMAP.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Aneesh Kumar K.V [Thu, 6 Aug 2009 06:12:31 +0000 (11:42 +0530)]
tune2fs: handle bad blocks when resizing inodes
When increasing inode size if we find that the new block
that we needed to increase the inode table size is a bad
block we fail. This make sure we don't end up with a corrupt
file system when doing inode resize on a file system having
bad blocks.
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Aneesh Kumar K.V [Thu, 6 Aug 2009 06:12:30 +0000 (11:42 +0530)]
tune2fs: Handle fs meta-data blocks during inode resize
With file system formated for RAID arrays we can have inode bitmap
and block bitmap after inode table. Make sure we move them around
properly when doing inode resize.
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Aneesh Kumar K.V [Thu, 6 Aug 2009 06:12:29 +0000 (11:42 +0530)]
tune2fs: Make e2fsprogs handle ENOSPC better with inode resize
This removes the metadata block bitmap and makes the error handling
simpler. It also check for the enospc with the correct number needed
blocks. Also added specific error messages. We need to run e2undo
only if we start modiyfing inode, group desc and inode table.
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Wed, 19 Aug 2009 05:16:47 +0000 (01:16 -0400)]
f_illitable_flexbg: Add new test
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Wed, 19 Aug 2009 05:06:50 +0000 (01:06 -0400)]
e2fsck: Add a global latch question for bad group descriptor checksums
Very often all the block group descriptors will have bad checksums, so
don't force the user answer 'yes' many, many times.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Wed, 19 Aug 2009 03:14:03 +0000 (23:14 -0400)]
e2fsck: Only ask to relocate a block group's inode table once
If multiple blocks of a block group's inode table overlaps with other
file system blocks, only ask once for each block group.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Wed, 19 Aug 2009 02:27:42 +0000 (22:27 -0400)]
e2fsck: Teach new_table_block() to allocate new itables/bitmaps with FLEX_BG
If the filesystem feature FLEX_BG is enabled, the inode table and
bitmap blocks can be located anywhere in the inode table. So for
FLEX_BG filesystems, new_table_block() now tries allocate in the block
group's flex_bg first, and if there is no space in the local flex_bg,
then try to allocate from the whole filesystem.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Eric Sandeen [Thu, 6 Aug 2009 03:30:48 +0000 (22:30 -0500)]
filefrag: don't print extent header on bmap fallback
The extent list header gets printed before we fall back to bmap:
# filefrag -v /mnt/test/bar
Filesystem type is:
58465342
File size of /mnt/test/bar is 12288 (3 blocks, blocksize 4096)
ext logical physical expected length flags <---- HERE
Discontinuity: Block 2 is at 17 (was 16)
/mnt/test/bar: 2 extents found
so delay printing it until we know fiemap is working.
(though ideally it'd be nice to have the same verbose output
regardless of the interface we used, I think).
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Eric Sandeen [Thu, 6 Aug 2009 02:43:23 +0000 (21:43 -0500)]
filefrag: fix frag count in bmap case
The fragmentation count in the bmap case seems to be
off by one:
/mnt/test/bar: 0 extents found
Addresses-Debian-Bug: #540376
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Sun, 16 Aug 2009 03:15:44 +0000 (23:15 -0400)]
filefrag: Add option to force use of the FIBMAP ioctl
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Mon, 10 Aug 2009 02:55:55 +0000 (22:55 -0400)]
libext2fs: Treat uninitialized parts of bitmaps as unallocated
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Mon, 10 Aug 2009 02:48:32 +0000 (22:48 -0400)]
Add V=1 support when linking e2freefrag in misc/Makefile.in
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Mon, 10 Aug 2009 00:15:46 +0000 (20:15 -0400)]
e2freefrag: Take into account the last free extent in the file system
Fix a bug in e2freefrag where if the last free extent is at the very
end of the filesystem, it would be disregarded.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Mon, 10 Aug 2009 00:09:10 +0000 (20:09 -0400)]
e2freefrag: Fix to work correctly for file systems with 1kb block sizes
If the file system has a non-zero s_first_data_block, as is the case
when the block size is 1kb, e2freefrag would incorrectly try to
reference invalid data blocks in the block allocation bitmap.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 9 Aug 2009 23:40:14 +0000 (19:40 -0400)]
e2freefrag: Do not print chunk-related information by default
Only print information related to chunk sizes if a chunksize is
printed.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 9 Aug 2009 23:29:30 +0000 (19:29 -0400)]
e2freefrag: Clarify e2freefrag's messages
"Free chunks" is confusing since it has nothing to do with the
chunksize; use "free extents" instead.
Also add a missing newline in an error message.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 9 Aug 2009 23:15:45 +0000 (19:15 -0400)]
e2freefrag: Initialize the ext2 error table
... so error messages are printed correctly
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sat, 8 Aug 2009 14:14:48 +0000 (10:14 -0400)]
e2fsck: Fix and enhance superblock dates in future problem reports
Fixed a bug where e2fsck would report that last mount time was in the
future when it was really the last write time that was in the future.
Also, since people can't seem to believe that (a) their distribution
has buggy init scripts, or (b) their CMOS/RTC clock or backup battery
is dead, print the incorrect time and the current system time.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 2 Aug 2009 00:43:00 +0000 (20:43 -0400)]
Merge branch 'maint' into next
Conflicts:
misc/Makefile.in
Göran Uddeborg [Wed, 29 Jul 2009 23:22:06 +0000 (19:22 -0400)]
po: update sv.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Samuel Thibault [Tue, 28 Jul 2009 16:23:22 +0000 (12:23 -0400)]
po: update fr.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Jakub Bogusz [Tue, 28 Jul 2009 15:44:42 +0000 (11:44 -0400)]
po: update pl.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Petr Pisar [Tue, 28 Jul 2009 15:44:42 +0000 (11:44 -0400)]
po: update cs.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Eric Sandeen [Mon, 27 Jul 2009 14:53:46 +0000 (10:53 -0400)]
e4defrag: remove a lot of cruft
e4defrag.c had a lot of stuff copied into it from other
places, redefinitions of existing interfaces, etc.
We should be able to remove most of this, as the tool only
works on recent kernels anyway, we should just pick up
definitions from recent kernel headers whenever possible.
I've left the local definitions of fallocate, fadvise
(changed to posix_fadvise) and sync_file_range, and
wrapped them in #ifdef configure-time tests - though
really it seems like only fallocate should be necessary
by now, and perhaps the others can be dropped.
We still need some Makefile work so that it won't try to
build e4defrag if the right pieces aren't there (and
if the local definitions won't work...)
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Mon, 27 Jul 2009 02:29:47 +0000 (22:29 -0400)]
debugfs: Add the new command dump_extents and extent the stat command
Extend the stat command to display more detailed extent information if
the file uses extent mapping instead of displaying the block map using
the block_iterate funtion.
Add the command dump_extents which displays even more detailed
information about an inode's extent tree.
This commit is an extension of a patch from Curt Wohlgemuth.
Signed-off-by: Curt Wohlgemuth <curtw@google.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Andreas Dilger [Fri, 24 Jul 2009 22:32:25 +0000 (18:32 -0400)]
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>
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>
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>
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>
Theodore Ts'o [Mon, 20 Jul 2009 13:40:46 +0000 (09:40 -0400)]
Update debian changelog and RELEASE-NOTES for interim release
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Theodore Ts'o [Wed, 1 Jul 2009 15:02:08 +0000 (11:02 -0400)]
Update Czech translation of e2fsprogs
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>