OSDN Git Service
Eric Sandeen [Tue, 26 Jan 2010 04:19:38 +0000 (22:19 -0600)]
libss: add newer libreadline to dlopen path
Rawhide now has libreadline.so.6 ... add it to the ever-expanding
list of libs to look for.
Unfortunately without commit
06ef971be505678ee462ae1844204ed24f14aedc
this fails in a rather cryptic way.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Nick Dokos [Fri, 5 Feb 2010 15:35:17 +0000 (10:35 -0500)]
e2fsck: Fix the check if a file is really a directory to understand extents
Pass 1 has a test to see if a special file is really a directory.
Signed-off-by: Nick Dokos <nicholas.dokos@hp.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Mon, 4 Jan 2010 18:59:04 +0000 (13:59 -0500)]
e2fsck: Add new e2fsck.conf option: broken_system_clock
The broken_system_clock allows the time to be in the future when in
preen mode. It's useful for people who have, as the name implies,
broken system clocks.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Mon, 30 Nov 2009 17:24:59 +0000 (12:24 -0500)]
libext2fs: Improve flex_bg inode table placement algorithm
When trying to find the best place for the inode table in the last
flex block group, use the true size for the flex_bg's portion of the
inode table instead of the worst case required size of the inode table
fragment if the file system is resized. This fixes a corner case
where if the size of the filesystem is just big enough that there is
only room for a single block group in the last flex_bg, and that
partial block group is too small for the full portion of the inode
table, the inode table is placed in the very first block group:
Group 64: (Blocks
2097152-
2099199) [INODE_UNINIT, ITABLE_ZEROED]
Checksum 0xd305, unused inodes 8080
Block bitmap at
2097152 (+0), Inode bitmap at
2097168 (+16)
Inode table at 8626-9130 (+
4292878770)
^^^^^^^^^
Thanks to Vyacheslav Dubeyko for pointing this out.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Mon, 30 Nov 2009 04:33:26 +0000 (23:33 -0500)]
debian: Add source lintian overrides
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Mon, 30 Nov 2009 01:19:10 +0000 (20:19 -0500)]
debian: Fix FTBFS problem caused by texi2html changing its output location
Unfortunately, texi2html gratuitously changed its behavior of where
its output html files are placed when the -split_chapter is in effect.
(First it was in a subdirectory; then it was in the current directory;
now it's back to putting the output html files in a subdirectory
again.)
Support either way of doing things since the texi2html team seems to
be indecisive...
Addresses-Debian-Bug: #552934
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 29 Nov 2009 06:28:14 +0000 (01:28 -0500)]
tests: Add new test f_holedir2
This tests e2fsck's handling of both direct and extent-mapped
directoris containing holes when the i_size is 0.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 29 Nov 2009 06:24:06 +0000 (01:24 -0500)]
e2fsck: Try to update on-disk bitmap in e2fsck_get_alloc_block() callback
The e2fsck_get_alloc_block() callback is used so that if the ext2fs
library needs to allocate blocks internally (most notably by the
extents functions), e2fsck's internal block usage map is consulted
since it is the only thing that can be trusted during a large part of
e2fsck's operation.
Change it to update the on-disk bitmap if it is loaded. This reduces
the number of spurious differences found in pass #5.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 29 Nov 2009 06:22:44 +0000 (01:22 -0500)]
e2fsck: Don't rehash directories which can fit in a single directory block
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 29 Nov 2009 06:12:12 +0000 (01:12 -0500)]
e2fsck: Fix block allocation for holes in extent-mapped directories
In pass 2, when allocating new blocks for holes in directories, use
ext2fs_set_bmap() instead of ext2fs_block_iterate2() with a helper
function so that the newly allocated directory blocks are correctly
assigned in extent-mapped directories.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 29 Nov 2009 05:08:54 +0000 (00:08 -0500)]
libext2fs: Fix SET_BMAP bugs in ext2fs_bmap() and ext2fs_bmap2()
Don't byte-swap the block number when setting i_block[x], since the
write_inode function will take of byte swapping the inode.
The phys_blk parameter contains an input parameter in the SET_BMAP
case, so it must be passed to ext2fs_bmap2() from the legacy function
ext2fs_bmap().
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 29 Nov 2009 05:06:10 +0000 (00:06 -0500)]
e2fsck: detect holes in extent-mapped directories
Directories are not allowed to be sparse; the code for scanning
extent-mapped directories was not calling ext2fs_add_dir_block() for
missing directory blocks, so we weren't catching this form of file
system corruption. Fix this.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sat, 28 Nov 2009 15:28:03 +0000 (10:28 -0500)]
filefrag: Fix a core dump on sparc32 platforms with 8k file systems
On 32-bit platforms where the file system block size is 8k or greater,
the calculation bpib*bpib*bpib* will overflow a 32-bit calculation,
leading to a divide by zero error. Fix this.
Thanks to Mikulas Patocka for pointing this out.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sat, 28 Nov 2009 14:44:08 +0000 (09:44 -0500)]
e2fsck: Move check to add an index to a directory after fixing i_size
The check that determines whether an directory needs to be have an
index added to it depends on i_size. So move it after we have fixed
up i_size so that we reliable will rehash a directory that needs it,
even if its i_size field was originally incorrect. Otherwise, a
second run of e2fsck would be needed before the directory gets an
index added.
Thanks to Mikulas Patocka for providing a sample file system which
demonstrated this problem.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sat, 28 Nov 2009 14:35:37 +0000 (09:35 -0500)]
e2fsck: Fix directory with holes even when i_size is wrong
The old method for detecting directories with holes depended on i_size
being correct, even though the correct value of i_size hadn't been
calculated yet. Hence, a directory inode with holes and an i_size of
0 would require two e2fsck passes to fix completely.
The replacement method for determining whether or not
ext2fs_add_dir_block() should be called is more reliable, and reduces
the size of e2fsck and makes the code more readable as a bonus.
Thanks to Mikulas Patocka for providing a sample file system which
demonstrated this problem.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Jakub Bogusz [Fri, 27 Nov 2009 20:23:14 +0000 (15:23 -0500)]
po: update pl.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Thu, 26 Nov 2009 15:38:04 +0000 (10:38 -0500)]
configure: Work around bug in autoconf 2.64
In autoconf 2.64, if AC_CHECK_LIB is first used in a conditional that
evaluates to false, the helper function ac_fn_c_try_link gets defined
inside that conditional, and then subsequent attempts to use
ac_fn_c_try_link() will blow up. Work around this by moving an
unconditional use of AC_CHECK_LIB to the beginning of configure.in.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Eric Sandeen [Tue, 17 Nov 2009 21:49:03 +0000 (15:49 -0600)]
mke2fs: open device writable for trim/discard
Sorry about that, the discard ioctl doesn't actually work
unless you open the file with write capabilities...
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Clytie Siddall [Wed, 25 Nov 2009 12:00:40 +0000 (07:00 -0500)]
po: update vi.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Arif E. Nugroho [Wed, 25 Nov 2009 12:00:39 +0000 (07:00 -0500)]
po: update id.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Petr Pisar [Wed, 25 Nov 2009 12:00:39 +0000 (07:00 -0500)]
po: update cs.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Tue, 17 Nov 2009 02:56:24 +0000 (21:56 -0500)]
e2fsck: Fix duplicate directory entries for non-indexed directories
Duplicate directory entries were not necessarily getting found and
fixed for non-indexed directories, since we were sorting these
directories by inode number, and the duplicate entry code assumed the
entries were getting sorted by name or directory name hash.
Addresses-Sourceforge-Bug: #
2862551
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Eric Sandeen [Wed, 7 Oct 2009 21:49:17 +0000 (16:49 -0500)]
mke2fs support for BLKDISCARD
Try calling the BLKDISCARD ioctl at mkfs time to pre-discard all blocks
on an ssd, or a thinly-provisioned storage device.
No real error checking; if it fails, it fails, and that's ok - it's
just an optimization. Also, it cannot work in conjunction with
the undo io manager, for obvious reasons.
Optionally disabled with a "-K" (mnemonic: Keep) option.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Karel Zak [Tue, 13 Oct 2009 13:52:59 +0000 (13:52 +0000)]
libext2fs: handle <=linux-2.6.19 bug in /proc/swaps
Linux <= 2.6.19 contained a bug in the /proc/swaps code where the
header would not be displayed (the first line).
This issue has been reported by Mike Frysinger for swapon(8).
Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Eric Sandeen [Tue, 10 Nov 2009 20:45:44 +0000 (14:45 -0600)]
libext2fs: don't swap extent-based journal backup
The f_illitable_flexbg test was failing on ppc, because
e2fsck_move_ext3_journal is doing a direct memcmp of i_block with
s_jnl_blocks, and failing.
This is because we don't swap extent data on read from disk; rather
we do it when we access the extents. However, ext2fs_swap_super
was swapping s_jnl_blocks unconditionally, so these didn't match.
Looks like we need to treat s_jnl_blocks the same as i_block, and
swap it on access, not on read. Except for the last i_size bit...
Reviewed-by: Andreas Dilger <adilger@sun.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Eric Sandeen [Mon, 9 Nov 2009 20:57:04 +0000 (14:57 -0600)]
resize2fs: exit fix_sb_journal_backup early for external journal
Resizing a filesystem with an external journal fails when it tries
to read inode 0:
# touch testfs
# truncate testfs
1342177280
# touch testjournal
# truncate testjournal
134217728
# mke2fs -O journal_dev testjournal
# losetup /dev/loop0 testjournal
# mkfs.ext4 -J device=/dev/loop0 testfs 127680
# resize2fs testfs
resize2fs 1.41.9 (22-Aug-2009)
Resizing the filesystem on testfs to 327680 (4k) blocks.
resize2fs: Illegal inode number while trying to resize testfs
Please run 'e2fsck -fy testfs' to fix the filesystem
after the aborted resize operation.
I think the right, simple thing to do is just bail out early
for an external journal here, as there are no backup blocks
to update.
Reported-by: mjevans1983@gmail.com
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Thu, 12 Nov 2009 22:54:45 +0000 (17:54 -0500)]
libss: initialize function pointer for readline_shutdown()
Clear the function pointer for readline_shutdown() so that if libss is
linking against a readline library which doesn't supply a
readline_shutdown() function, ss_delete_invocation() won't seg fault.
Thanks to Solar Designer <solar@openwall.com> for reporting this
problem to me.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Wed, 28 Oct 2009 07:42:47 +0000 (03:42 -0400)]
debian: Fix pre-depends relation for util-linux-ng
Commit
06807d9 had a typo; we need util-linux-ng >= 2.15~rc1-1, not
<< 2.15~rc1-1!
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sat, 24 Oct 2009 19:04:54 +0000 (15:04 -0400)]
debian: Add pre-depends for util-linux for util-linux-ng builds
Addresses-Debian-Bug: #551795
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Michael Roth [Sat, 17 Oct 2009 11:26:51 +0000 (13:26 +0200)]
Update .gitignore
Signed-off-by: Michael Roth <mroth@nessie.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Sat, 24 Oct 2009 18:25:39 +0000 (14:25 -0400)]
tune2fs.8: Clarify tune2fs's -i option
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sat, 24 Oct 2009 18:15:55 +0000 (14:15 -0400)]
dumpe2fs: Fix usage message for -o superblock=<num> and -o blocksize=<num>
Addresses-Launchpad-Bug: #448099
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Eric Sandeen [Wed, 21 Oct 2009 07:43:02 +0000 (03:43 -0400)]
configure.in: Fix typo: remove '2' from blkid_probe_get_topology2
I think vim <esc>wq turned into <esc>2wq or something; in any case
blkid_probe_get_topology2 is not the right thing to search for.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Theodore Ts'o [Wed, 21 Oct 2009 05:46:58 +0000 (01:46 -0400)]
libext2fs: Fix FEATURE_RO_COMPAT_HUGE_FILE && !HUGE_FILE_FL
If the RO compat HUGE_FILE feature flag is set, but the inode's
HUGE_FILE_FL flag is not set, we should still pay attention to the
high 32 bits of the i_blocks filed.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sat, 17 Oct 2009 00:46:45 +0000 (20:46 -0400)]
e2fsck: Accept superblock times to be fudged by up to 24 hours by default
Unfortunately, due to Windows' unfortunate design decision to
configure the hardware clock to tick localtime, instead of the more
proper and less error-prone UTC time, many users end up in the
situation where the system clock is incorrectly set at the time when
e2fsck is run.
Historically this was usually due to some distributions having buggy
init scripts and/or installers that didn't correctly detect this case
and take appropriate countermeasures. However, it's still possible,
despite the best efforts of init script and installer authors to not
be able to detect this misconfiguration, usually due to a buggy or
misconfigured virtualization manager or the installer not having
access to a network time server during the installation process. So
by default, we allow the superblock times to be fudged by up to 24
hours. This can be disabled by setting options.accept_time_fudge to
the boolean value of false in e2fsck.conf. The old
options.buggy_init_scripts is left for backwards compatibility.
Since we are now accepting the 24 hour time fudge by default, there is
no longer a need to install an Ubuntu-specific e2fsck.conf file, so we
can remove it.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Tue, 13 Oct 2009 01:59:37 +0000 (21:59 -0400)]
e2fsck: Fix handling of non-zero i_blocks_high field
E2fsck was not properly printing the i_blocks field in filesystem
corruption messages, and it was not properly checking i_blocks_hi and
i_blocks_lo, either. This commit fixes this.
Thanks to Felipe Conteras for pointing this out.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 4 Oct 2009 22:02:24 +0000 (18:02 -0400)]
e2fsck: Interpret negative blkcount in file system problem reports
Non-expert users get confused when they see messages like this:
Illegal block #-1 (
2291965952) in inode 176. CLEARED.
So change it to be something a little bit more understandable:
Illegal indirect block (
2291965952) in inode 176. CLEARED.
Addresses-SourceForge-Bug: #
2871782
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 4 Oct 2009 20:29:17 +0000 (16:29 -0400)]
libext2fs: Always build file_io.c
Commit
1d9b818: dumpe2fs: Print more information about the inline journal
caused dumpe2fs to use ext2fs_file_open2(). Previously the file_io
functions were only used by debugfs, so if debugfs was disabled,
file_io was not built. Now that dumpe2fs is also using file_io, we
need to build it unconditionally.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 4 Oct 2009 20:21:13 +0000 (16:21 -0400)]
tests: Account for new mke2fs topology information
The previous commit adds a new line printed by mke2fs with the
filesystem/device topology information. Update the regression test's
expected output to account for this.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Eric Sandeen [Fri, 2 Oct 2009 16:32:42 +0000 (11:32 -0500)]
mke2fs: get device topology values from blkid
Handle automatic selection of stride/stripe:
mke2fs 1.41.9 (22-Aug-2009)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=16 blocks, Stripe width=32 blocks
...
And warn on block device misalignment:
mke2fs 1.41.9 (22-Aug-2009)
/dev/sdc1 alignment is offset by 32256 bytes.
This may result in very poor performance, (re)-partitioning suggested.
Proceed anyway? (y,n)
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Sun, 4 Oct 2009 18:45:08 +0000 (14:45 -0400)]
Don't use in-tree header files if using system uuid or blkid libraries
This commit forces the use of the system-provided blkid or uuid header
files if we are using the system-provided blkid or uuid libraries.
This avoids using the in-tree header files with the system libraries.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 4 Oct 2009 03:17:45 +0000 (23:17 -0400)]
e2fsck: Use the correct problem code in the case of LAST_WRITE_FUDGED
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 4 Oct 2009 02:33:47 +0000 (22:33 -0400)]
blkid: Avoid a potentially error message when running "make clean"
This error isn't terribly important, but apparently it causes some
users/developers distress.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Peng Tao [Mon, 28 Sep 2009 10:51:53 +0000 (18:51 +0800)]
debugfs: add matching fclose
If the cmd_file is not stdin, we should close the file handle via fclose().
Thanks David Binderman to point this out.
Addresses-Novell-Bugzilla: #524526
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cristian Rodríguez [Fri, 2 Oct 2009 13:24:11 +0000 (09:24 -0400)]
fix fd leak that causes fsck to fail with "too many open files"
fsck leaks fds when invoked with -R -A -M -a -t noopts=nofail
Signed-off-by: Cristian Rodríguez <crrodriguez@opensuse.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Wed, 9 Sep 2009 01:33:03 +0000 (21:33 -0400)]
libext2fs: Add error table initialization to test programs
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Wed, 9 Sep 2009 01:29:21 +0000 (21:29 -0400)]
e2undo: Initialize com_err error tables for the ext2fs library
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Mon, 7 Sep 2009 20:21:49 +0000 (16:21 -0400)]
libext2fs: Round up the bitmap size when allocating a new bitmap
The x86 BT assembly instructure can overshoot the end of a bit array
when testing a bit at the end of the bit array, even if it never needs
to look at those memory locations. This can cause a spurious
segmentation fault. If we allocate a little extra memory, it avoids
this problem. See:
http://faydoc.tripod.com/cpu/bt.htm
This doesn't happen on Linux, probably because of the glibc's malloc()
function works, but apparently it's a major problem on the *BSD
operating systems.
Addresses-Sourceforge-Bug: #
2328708
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Mon, 7 Sep 2009 19:17:51 +0000 (15:17 -0400)]
mke2fs.8.in: Clarify flex_bg feature description
Add a more explicit description of how specifying the flex_bg file
system feature changes the layout of the per-block group metadata.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Mon, 7 Sep 2009 18:53:44 +0000 (14:53 -0400)]
tune2fs.8: Document the flex_bg file system option in the man page
Addresses-Sourceforge-Bug: #
2822186
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Peng Tao [Fri, 4 Sep 2009 09:15:40 +0000 (17:15 +0800)]
resize2fs: fix minimum resize size calculation with flex_bg
When flex_bg is on, calculate_minimum_resize_size() should add more meta
blocks for newly added flex_bg.
Addresses-RedHat-Bugzilla: #519131
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Peng Tao [Fri, 4 Sep 2009 07:22:39 +0000 (15:22 +0800)]
resize2fs: calculate minimal fs size only once
When running resize2fs -M, no need to recalculate the minimal fs size.
Signed-off-by: "Peng Tao" <bergwolf@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Mon, 7 Sep 2009 01:28:47 +0000 (21:28 -0400)]
configure.in, configure: Drop --with-cc, --with-ccopts, --with-ldopts
Remove the configure options --with-cc, --with-ccopts, --with-ldopts,
and --with-ld (which never worked), since the first three can be
replaced with CC=, CCFLAGS=, and LDFLAGS= on the configure
command-line. The default for --with-cc caused the CC= to be
overridden even with it was specified to the configure script.
Addresses-Sourceforge-Bug: #
2843248
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 6 Sep 2009 22:55:09 +0000 (18:55 -0400)]
dumpe2fs: Print more information about the inline journal
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Wed, 2 Sep 2009 00:27:29 +0000 (20:27 -0400)]
debian: Make sure libblkid1 and libblkid1-dbg have changelogs
Thanks to Scott James Remnant <scott@canonical.com> for pointing this
problem and suggesting a fix.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Wed, 2 Sep 2009 00:01:38 +0000 (20:01 -0400)]
e2fsck: Avoid scary failure messages on low-memory systems
On a very low-memory system, where ext2fs_check_desc() fails because
it can't allocate a block bitmap, catch this error and report it
immediate. This avoids something like this, which could scare and
mislead the user:
e2fsck: Group descriptors look bad... trying backup blocks...
Media was not cleanly unmounted, check forced.
Pass 1: Checking inodes, blocks, and sizes
Error allocating block bitmap (1): Memory allocation failed
e2fsck: aborted
Addresses-Debian-Bug: #509529
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Karel Zak [Sun, 23 Aug 2009 19:13:56 +0000 (21:13 +0200)]
blkid: support .ko.gz in modules.dep parser
The Linux kernel modules could be compressed, it means modules.dep
parser in libblid has to support .ko.gz extension too.
(Note, I've talked about this problem with Jon Masters and his
suggestion is to exec(/sbin/modinfo) rather than directly parse
modules.dep. BTW, the modules.dep file is deprecated.)
Address-Red-Hat-Bug: #518572
Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Tue, 25 Aug 2009 14:07:16 +0000 (10:07 -0400)]
tune2fs: Fix "tune2fs -j <dev>" for extent-enabled filesystems
For filesystms that have the extent feature enabled, we need to grab
the use EXT2_IOC_GETFLAGS so that we don't accidentally end up trying
to request clearing the EXT2_EXTENT_FL, which is not supported and
causes the tune2fs -j error out.
Also fix the error returning in ext2fs_add_journal_inode() so it
returns a proper error code if the fstat() or ioctl() calls fail.
Addresses-Launchpad-bug: #416648
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 23 Aug 2009 19:06:48 +0000 (15:06 -0400)]
mke2fs.conf: Use the feature name "extent" instead of "extents"
The feature name "extent" is documented in mke2fs.conf, although both
"extent" and "extents" are accepted by e2fsprogs.
Addreses-Debian-Bug: #540111
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 23 Aug 2009 14:09:36 +0000 (10:09 -0400)]
Fix debian packaging to work correctly on post-Lenny systems
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 23 Aug 2009 03:41:49 +0000 (23:41 -0400)]
e2freefrag: Update manpage to include e2fsprogs version and release date
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 23 Aug 2009 02:38:50 +0000 (22:38 -0400)]
Update release notes, version string, etc. for E2fsprogs 1.41.9 release
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 23 Aug 2009 03:02:41 +0000 (23:02 -0400)]
make-sparse: Write a zero-byte at the end of the image
This is necessary to preserve the i_size of the output file; otherwise
programs like e2fsck will complain that the filesystem has been
truncated.
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>
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>
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>