Whamcloud - gitweb
Theodore Ts'o [Wed, 23 Apr 2008 03:22:17 +0000 (23:22 -0400)]
ext2fs_open_inode_scan: Handle an non-zero bg_itable_used in block group 0
Previously, the portion of the inode table for block group 0 was
always completely zero'ed out, so the ext2fs_open_inode_scan() didn't
handle a non-zero bg_itable_used value for the first block group. Fix
this.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Wed, 23 Apr 2008 03:18:37 +0000 (23:18 -0400)]
mke2fs/libext2fs: Fix lazy inode table initialization
This fixes some bugs which I introduced recently while revamping the
uninit_bg code. Since mke2fs is no longer calling
ext2fs_set_gdt_csum(), it's important that ext2fs_initialize()
correctly initialize bg_itable_unused for all block group descriptors.
In addition, mke2fs needs to zero out the the reserved inodes based on
the values of bg_itable_unused set by ext2fs_initialize().
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Tue, 22 Apr 2008 01:35:44 +0000 (21:35 -0400)]
Merge branch 'maint'
Conflicts:
configure
Theodore Ts'o [Tue, 22 Apr 2008 01:24:43 +0000 (21:24 -0400)]
Update texinfo.tex file newer version from the FSF
The one we had in the tree before was from circa 1996. Lots of
updates and bug fixes since then....
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Tue, 22 Apr 2008 01:21:57 +0000 (21:21 -0400)]
libext2fs.texinfo: Fix @deftypefun definitions so they are all on one line
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Manish Katiyar [Mon, 14 Apr 2008 11:50:03 +0000 (17:20 +0530)]
Fix "make docs" rule in Makefile for doc folder.
Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Mon, 21 Apr 2008 23:22:49 +0000 (19:22 -0400)]
blkid: Keep cached filesystem information on EACCES and ENOENT errors
When a nonprivileged user uses the blkid command, we want to keep the
cached filesystem information, and opening a device file could result
in an EACCESS or ENOENT (if an intervening directory is mode 700). We
were previously testing for EPERM, which was really the wrong error
code to be testing against.
Addresses-Launchpad-Bug: #220275
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Mon, 21 Apr 2008 05:29:01 +0000 (01:29 -0400)]
Transfer responsibility of setting the *_UNINIT flags to libext2fs
Mke2fs used to have special case, ugly code in
setup_lazy_bg/setup_uninit_bg flag which set the flags based on all
sorts of special cases. Change it so that it is done in libext2fs,
and fix mke2fs to use alloc_stats functions which will take care of
clearing the *_UNINIT flags automatically as needed.
This is preparatory work to make the flex_bg allocation patch much
cleaner.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Mon, 21 Apr 2008 03:33:34 +0000 (23:33 -0400)]
Remove LAZY_BG feature
This simplifies the code, and using the uninit_bg with the inode table
lazily initialized is just as good.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 20 Apr 2008 23:22:49 +0000 (19:22 -0400)]
Add comments documenting ext2fs_[reserve_]super_and_bgd_loc()
Add an explanation of exactly what ext2fs_super_and_bgd_loc() and
ext2fs_reserve_super_and_bgd_loc() do, and more importantly, exactly
what they return. Note that most callers should *not* rely on the
return value since it's rarely useful, especially once the flex_bg
feature is enabled and inode table and allocation bitmap blocks may
not be in the block group.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sat, 19 Apr 2008 14:30:59 +0000 (10:30 -0400)]
e2fsck: Fix pass5 handling of meta_bg and uninit_bg combination
The pass5 lazy block group support didn't understand meta_bg formats
correctly. Fix this.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sat, 19 Apr 2008 13:47:37 +0000 (09:47 -0400)]
ext2fs_set_gdt_csum: Remove setting of BLOCK_UNINIT
This function tried to set BLOCK_UNINIT based on the return value of
ext2fs_super_and_bgd_loc. That's not something that works once we
start allowing flex_bg since the block group metadata might not be
located in the blockgroup itself.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sat, 19 Apr 2008 13:28:47 +0000 (09:28 -0400)]
ext2fs_set_gdt_csum: Remove bogus setting of ITABLE_ZEROED
It used to be the case that ext2fs_set_gdt_csum set the ITABLE_ZEROED
flag if the INODE_UNINIT is not set. This assumed that the only
caller of ext2fs_set_gdt_csum was e2fsck (which was not true), and
that e2fsck would take care of zeroing the inode table (whic was also
not true).
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 20 Apr 2008 20:10:07 +0000 (16:10 -0400)]
libe2p: Print the s_min_extra_isize and s_wanted_extra_isize fields
Make dumpe2fs and debugfs print out the s_min_extra_isize and
s_wanted_extra_isize fields from the superblock.
Update tests expect files as appropriate.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 20 Apr 2008 20:02:13 +0000 (16:02 -0400)]
libext2fs: Initialize s_min_extra_isize and s_wanted_extra_isize
Set the s_min_extra_isize and s_wanted_extra_isize superblock fields
to reasonable defaults in ext2fs_initialize().
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Eric Sandeen [Fri, 18 Apr 2008 15:28:44 +0000 (10:28 -0500)]
blkid: more sanity checks for swap v1
mkswap followed by pvcreate on a block device
will still turn up as "swap" in blkid, because
pvcreate isn't particularly careful about zeroing
old signatures. (neither is mkswap, for that matter).
Testing for appropriate version and page counts
gives us a bit more confidence that we have a
real swap (v1) partition.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Fri, 18 Apr 2008 14:19:27 +0000 (10:19 -0400)]
mke2fs: Disentangle lazy_bg from uninit_bg's lazy inode table initialization
Instead of using -O lazy_bg,uninit_bg as the way of requesting that
the inode table be lazy unitialized, use the parameter
lazy_itable_init, which can either be set via mke2fs's -E option, or
via /etc/mke2fs.conf.
Also fix some random problems in mke2fs's man page, including
documenting the extent feature, which had been missing.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Fri, 18 Apr 2008 03:33:05 +0000 (23:33 -0400)]
Change the primary name of the extents feature to be 'extent'
This was the original name used by Lustre's patches; keep the plural
when converting feature names to a feature mask for compatibility's
sake.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Fri, 18 Apr 2008 03:31:44 +0000 (23:31 -0400)]
Rename the feature uninit_groups to uninit_bg
Allow the old name of uninit_groups when converting feature names for
backwards compatibility for scripts running mke2fs and tune2fs.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Eric Sandeen [Wed, 2 Apr 2008 01:38:58 +0000 (20:38 -0500)]
e2fsck: Only check PR_1_EXTENT_ENDS_BEYOND for leaf nodes
pass1 was checking that an "extent's" start+len did not extend
past the last filesystem block, but unless we are at a leaf
block, the physical block is that of a node in the tree, and
the length may include sparseness. The test is only valid
for leaf blocks.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Eric Sandeen [Tue, 8 Apr 2008 03:00:59 +0000 (22:00 -0500)]
Make extent_goto() deterministic when logical block not found
Make sure that extent_goto() leaves us at the last extent
prior to the requested logical block, if the logical block
requested lands in a hole.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Eric Sandeen [Tue, 8 Apr 2008 03:00:58 +0000 (22:00 -0500)]
Fix ext2fs_extent_insert when at last extent in node
ext2fs_extent_insert() only did a memmove if path->left
was > 0, but if we are at the last extent in the node,
path->left == 0, and this node must be moved before the
current extent is replaced with the newly inserted node.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Eric Sandeen [Tue, 8 Apr 2008 03:00:57 +0000 (22:00 -0500)]
print a bit more info for the tst_extents info command
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Thu, 17 Apr 2008 20:54:24 +0000 (16:54 -0400)]
Fix tst_extents build when building w/o dynamic libraries
$(LIBSS) should automatically include @DLOPEN_LIB@ so the right thing
happens for programs that need to use the ss library.
Reorder the library link order for tst_extents since the blkid library
uses libuuid functions.
Thanks to Eric Sandeen for pointing this problem out!
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Wed, 9 Apr 2008 15:39:11 +0000 (11:39 -0400)]
Add support for the HUGE_FILE feature
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Thu, 17 Apr 2008 20:32:28 +0000 (16:32 -0400)]
Merge branch 'maint'
Göran Uddeborg [Sun, 13 Apr 2008 17:31:34 +0000 (13:31 -0400)]
po: update sv.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Jakub Bogusz [Sun, 13 Apr 2008 17:31:34 +0000 (13:31 -0400)]
po: update pl.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Samuel Thibault [Sun, 13 Apr 2008 17:31:34 +0000 (13:31 -0400)]
po: update fr.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Philipp Thomas [Sun, 13 Apr 2008 17:31:34 +0000 (13:31 -0400)]
po: update de.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Petr Pisar [Sun, 13 Apr 2008 17:31:34 +0000 (13:31 -0400)]
po: update cs.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Wed, 9 Apr 2008 19:40:43 +0000 (15:40 -0400)]
Fix non-POSIX ">&" in the Makefile for lib/ss's "make check" rule
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Mon, 7 Apr 2008 16:38:16 +0000 (12:38 -0400)]
Merge branch 'maint'
Matthias Koenig [Mon, 7 Apr 2008 15:49:34 +0000 (11:49 -0400)]
e2fsck: avoid double free of ctx->filesystem_name
In current git there is a double free on ctx->filesystem_name in the
end of main() and in e2fsck_free_context, causing e2fsck to abort at
the end of pass5.
Signed-off-by: Matthias Koenig <mkoenig@suse.de>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 6 Apr 2008 21:22:08 +0000 (17:22 -0400)]
Merge branch 'es/warnings-fix' into next
Eric Sandeen [Sun, 30 Mar 2008 04:01:52 +0000 (23:01 -0500)]
Fix a couple of implicit function declarations
Fedora seems to be gearing up to add
-Werror-implicit-function-declaration
to the standard build flags, so I thought I'd get out ahead
of this one...
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Tue, 19 Feb 2008 13:32:58 +0000 (08:32 -0500)]
New mke2fs filesystem and usage types support
Provide mke2fs with a much more sophisticated system for controlling
configuration parameters of a newly created filesystem based on a
split filesystem and usage type system. The -t option to mke2fs was a
deprecated alias to -c; it now specifies a filesystem type (ext2,
ext3, ext4, etc.), while the -T option can now be a comma separated
usage list.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 6 Apr 2008 21:10:49 +0000 (17:10 -0400)]
Merge branch 'maint' into next
Theodore Ts'o [Sun, 6 Apr 2008 21:07:04 +0000 (17:07 -0400)]
Fix m_no_opt regression test
The m_no_opt test has been silently failing since the addition of
mke2fs.conf, since it was trying to use resize_inode on a non-sparse
filesystem. Fix it so it works correctly.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 6 Apr 2008 21:00:23 +0000 (17:00 -0400)]
libext2fs: Fix resize inode creation with non-standard s_first_data_block
Thanks to Max Lindner (lokimuh) for pointing this out.
I'm playing around a bit with ext2 and multi-user encryption and I
need space for my key management. So I set s_first_data_block to 4000
or something like that.
This way mke2fs segfaults when executing
ext2fs_create_resize_inode() because
blk_t goal = 3 + sb->s_reserved_gdt_blocks + fs->desc_blocks +
fs->inode_blocks_per_group;
will produce a integer underrun later and segfault then in the
ext2fs_test_bit assembler inline function.
when exchanging 3 with 2 + sb->s_first_data_block, mke2fs does not
segfault.
I'm not 100% sure if thats the correct way dealing with this issue
but I think its a proper solution.
Addresses-Sourceforge-Bug: #1935847
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Clytie Siddall [Sun, 6 Apr 2008 20:11:56 +0000 (16:11 -0400)]
po: update vi.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Benno Schulenberg [Sun, 6 Apr 2008 20:11:56 +0000 (16:11 -0400)]
po: update nl.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Samuel Thibault [Wed, 2 Apr 2008 00:34:24 +0000 (20:34 -0400)]
po: update fr.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Wed, 2 Apr 2008 00:32:55 +0000 (20:32 -0400)]
Remove bashism from configure script
Thanks to Mike Frysinger for pointing this out.
Addresses-Sourceforge-Bug: 1921969
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Tue, 1 Apr 2008 21:03:00 +0000 (17:03 -0400)]
libext2fs: Fix big-endian bug in tst_csum.c
It's not necessary to byte-swap the checksum.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Tue, 1 Apr 2008 20:45:37 +0000 (16:45 -0400)]
Add dependency rule so that static library when necessary for "make check"
Some library makefiles use $(LIB)/$(LIBRARY).a as a dependency for the
static library built by the makefile fragment. Add it as a target
created when building $(LIBRARY).a so that it is rebuilt when necessary.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Tue, 1 Apr 2008 20:43:24 +0000 (16:43 -0400)]
libext2fs: Make all test programs link only against the static library
This is needed so that all of the test programs compile correctly on
big-endian systems.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Eric Sandeen [Tue, 1 Apr 2008 19:18:44 +0000 (15:18 -0400)]
e2fsck: Fix extent flag validity tests in pass1 on big endian boxes.
Extent data is shared with the i_block[] space in the inode,
but it is always swapped on access, not when the inode is read.
In e2fsck/pass1.c we must be careful when checking validity
of the extents flag on the inode. If the flag was set when
the inode was read & swapped, then the extents data itself
(in ->i_block[]) was NOT swapped, so testing for a valid
extent header requires some swapping first. Then, if we
ultimately set the extents flag, all of i_block[] must be
re/un-swapped.
This passes the f_extent regression test on both ppc & x86.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Tue, 1 Apr 2008 18:59:47 +0000 (14:59 -0400)]
dumpe2fs: Print the group checksum and the block options in a nicer way
Also add support for printing the ITABLE_ZERO flag
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Andreas Dilger [Mon, 31 Mar 2008 18:32:39 +0000 (14:32 -0400)]
Add new regression test: f_uninit_last_uninit
Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Mon, 31 Mar 2008 16:16:51 +0000 (12:16 -0400)]
Fix trailing whitespace in e2fsck/problem.[ch]
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Andreas Dilger [Mon, 31 Mar 2008 16:14:22 +0000 (12:14 -0400)]
e2fsck: Add check to enforce a valid block bitmap in last block group
Add a check for the UNINIT_BLOCKS flag set in the last group. The kernel
patch doesn't handle this gracefully, because it assumes there are a full
set of blocks in each group marked UNINIT_BLOCKS. The kernel should be
fixed up, but in the meantime this avoids hitting the problem, and is
more consistent with lazy_bg not marking the last group UNINIT.
Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Andreas Dilger [Mon, 31 Mar 2008 14:59:27 +0000 (10:59 -0400)]
Split the m_lazy test case into two cases: m_lazy and m_lazy_resize
Split the m_lazy testcase into two tests - one that has resize enabled,
and one that does not. There were previously problems with lazy+resize
because the resize feature consumed blocks in some of the groups.
Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Andreas Dilger [Mon, 31 Mar 2008 14:57:38 +0000 (10:57 -0400)]
libext2fs: Micro-optimization in inode scan code
Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Andreas Dilger [Mon, 31 Mar 2008 14:50:19 +0000 (10:50 -0400)]
ext2fs_set_gdt_csum(): Return an error code on errors instead of void
Change the function signature so that ext2fs_set_gdt_csum() returns an
error code.
If the inode bitmap hasn't been loaded return EXT2_ET_NO_INODE_BITMAP.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Andreas Dilger [Mon, 31 Mar 2008 12:34:10 +0000 (08:34 -0400)]
ext2fs_set_gdt_csum(): Force the last block group to have a valid block bitmap
Never set the UNINIT_BLOCKS flag for the last group since the kernel
doesn't handle the case graefully if there is a full set of blocks in
each blockgroup marked UNINIT_BLOCKS. The kernel should be fixed up,
but in the meantime this avoids hitting the problem, and is more
consistent with lazy_bg not marking the last group UNINIT.
Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Andreas Dilger [Mon, 31 Mar 2008 04:40:51 +0000 (00:40 -0400)]
ext2fs_set_gdt_csum(): Clean up superblock dirty flag handling
Only mark the superblock as dirty if the function actually managed to
change part of the block group descriptor.
Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Andreas Dilger [Mon, 31 Mar 2008 00:05:12 +0000 (20:05 -0400)]
debugfs: Add support for "set_block_group <bg_num> checksum calc"
Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Andreas Dilger [Sun, 30 Mar 2008 18:14:31 +0000 (14:14 -0400)]
Fix the copyright notice in lib/ext2fs/tst_csum.c to be GPLv2 only
Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Andreas Dilger [Sun, 30 Mar 2008 18:13:03 +0000 (14:13 -0400)]
Improve ext4 feature descriptions in mke2fs and tune2fs man pages
Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 30 Mar 2008 18:03:51 +0000 (14:03 -0400)]
Merge branch 'maint'
Andreas Dilger [Sun, 30 Mar 2008 18:02:00 +0000 (14:02 -0400)]
Use -E instead of the deprecated -R option in the mke2fs man page
Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sat, 29 Mar 2008 18:46:48 +0000 (14:46 -0400)]
e2fsck: Avoid core dump when using the -N option
This bug was accidentally introduced by commit
1dc506cb.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Michael Spang [Sat, 29 Mar 2008 11:32:47 +0000 (07:32 -0400)]
debian: Use UID/GID ranges from adduser.conf, if present
Addresses-Debian-Bug: #473179
Signed-off-by: Michael Spang <mspang@uwaterloo.ca>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Wed, 26 Mar 2008 13:42:00 +0000 (09:42 -0400)]
logsave: Pass any SIGTERM or SIGINT signals to child process
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Wed, 26 Mar 2008 13:09:09 +0000 (09:09 -0400)]
e2fsck: Include the device name in the progress information
Also make sure the device name has no spaces in it, to avoid confusing
displays, and make ctx->filesystem_name and ctx->device_name allocated
memory to avoid potential problems in the future.
Addresses-Launchpad-Bug: #203323
Addresses-Sourceforge-Bug: #1926023
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Wed, 26 Mar 2008 12:58:25 +0000 (08:58 -0400)]
fsck: Treat "ext4" and "ext4dev" as ext* filesystems
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Wed, 26 Mar 2008 12:53:13 +0000 (08:53 -0400)]
fsck: Make -Cn work correctly where n != 0
Previously, fsck was only passing in -Cn to the first e2fsck process
to start up, and enabling the progress information by sending a
SIGUSR1 signal. This didn't work if the progress information was
intended to go to file descriptor, since the information was never
passed to e2fsck.
So we now pass the progress fd in as a negative number if the progress
information is intended to be initially suppressed.
Addresses-Launchpad-Bug: #203323
Addresses-Sourceforge-Bug: #1926023
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Wed, 26 Mar 2008 12:26:01 +0000 (08:26 -0400)]
e2fsck: Support a negative argument to -C to suppress progress information
If a negative progress argument is given to -C, initially suppress the
progress information. It can be enabled later by sending the e2fsck
process a SIGUSR1 signal.
Addresses-Launchpad-Bug: #203323
Addresses-Sourceforge-Bug: #1926023
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Wed, 26 Mar 2008 12:11:11 +0000 (08:11 -0400)]
fsck: Fix -C handling so that subsequent progress bars are enabled
The exiting fsck instance wasn't marked as DONE, so the safety checks
thought a progress bar was still in progress, and so we didn't enable
another filesystem's checking.
Addresses-Debian-Bug: #432865
Addresses-Launchpad-Bug: #203323
Addresses-Sourceforge-Bug: #1926023
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Eric Sandeen [Tue, 25 Mar 2008 13:59:45 +0000 (09:59 -0400)]
Fix parallel builds for lib/ext2fs/extent.o
Updated the Makefile dependencies using "make depend".
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Eric Sandeen [Mon, 24 Mar 2008 12:25:40 +0000 (08:25 -0400)]
libext2fs: Fix byte-swap logic for i_block[] in inodes with extents
ext2fs_swap_inode_full() was incorrectly swapping the i_block array
for extents.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Mon, 24 Mar 2008 12:24:45 +0000 (08:24 -0400)]
Add new test case to check e2fsck's response to fast symlinks w/ EXTENTS_FL
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Mon, 24 Mar 2008 12:17:24 +0000 (08:17 -0400)]
e2fsck: Don't object to extents flags on deleted fast symlinks
Thanks to Aneesh Kumar for pointing this out.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Fri, 21 Mar 2008 13:25:23 +0000 (09:25 -0400)]
mke2fs: Clarify man page that -T is interpreted using the current timezone
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Fri, 21 Mar 2008 13:10:09 +0000 (09:10 -0400)]
debugfs, tune2fs: Handle daylight savings time when parsing a time string
We need to set tm_isdst to -1 so that mktime will automatically
determine whether or not daylight savings time (DST) is in effect.
Previously tm_isdst was set to 0, which caused mktime to interpret the
time as if it was always not using DST.
Addresses-Debian-Bug: #471882
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Eric Sandeen [Wed, 19 Mar 2008 20:20:18 +0000 (15:20 -0500)]
Fix ext2fs_extent_get for uninit leaf extents
The ext2fs_extent_get() function was not OR-ing together UNINIT
and LEAF flags in the case where an extent was both; so if we
had an extent which was both uniint and leaf, pass1 would bail
out where depth == max_depth but was not marked as leaf, and
e2fsck (from the next branch) would abort with:
e2fsck 1.40.8 (13-Mar-2008)
Pass 1: Checking inodes, blocks, and sizes
Error1: No 'down' extent
Aborted
Also, if the error is encountered again, print the inode number
to aid debugging until it's properly handled, at least.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Jose R. Santos [Mon, 22 Oct 2007 02:04:24 +0000 (21:04 -0500)]
Add m_uninit test case
Add test case to test for uninit block groups.
Signed-off-by: Jose R. Santos <jrs@us.ibm.com>
Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Jose R. Santos [Mon, 22 Oct 2007 02:04:19 +0000 (21:04 -0500)]
Add new m_lazy test case
Add test case for lazy bg feature.
Signed-off-by: Jose R. Santos <jrs@us.ibm.com>
Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Jose R. Santos [Mon, 22 Oct 2007 02:04:03 +0000 (21:04 -0500)]
Make e2fsck uninit block group aware
This patch has all the necesary pieces to open and fix filesystems created
with the uninit block group feature.
Signed-off-by: Jose R. Santos <jrs@us.ibm.com>
Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Jose R. Santos [Mon, 22 Oct 2007 02:03:57 +0000 (21:03 -0500)]
Make debugfs uninit block group aware
Signed-off-by: Jose R. Santos <jrs@us.ibm.com>
Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Jose R. Santos [Mon, 22 Oct 2007 02:03:52 +0000 (21:03 -0500)]
Make resize2fs uninit block group aware
Signed-off-by: Jose R. Santos <jrs@us.ibm.com>
Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Jose R. Santos [Mon, 22 Oct 2007 02:03:46 +0000 (21:03 -0500)]
Make dumpe2fs uninit block group aware
Signed-off-by: Jose R. Santos <jrs@us.ibm.com>
Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Jose R. Santos [Mon, 22 Oct 2007 02:03:41 +0000 (21:03 -0500)]
Make tune2fs uninit block group aware
Signed-off-by: Jose R. Santos <jrs@us.ibm.com>
Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Jose R. Santos [Mon, 22 Oct 2007 02:03:36 +0000 (21:03 -0500)]
Add support for creating filesystems using uninit block group
Signed-off-by: Jose R. Santos <jrs@us.ibm.com>
Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Jose R. Santos [Mon, 22 Oct 2007 02:03:30 +0000 (21:03 -0500)]
Rename feature name from gdt_checksum to uninit_groups
This name is a more intuitive option when running mke2fs.
Signed-off-by: Jose R. Santos <jrs@us.ibm.com>
Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Jose R. Santos [Mon, 22 Oct 2007 02:03:25 +0000 (21:03 -0500)]
Add uninit block group support to various libext2fs functions
Signed-off-by: Jose R. Santos <jrs@us.ibm.com>
Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Jose R. Santos [Mon, 22 Oct 2007 02:03:19 +0000 (21:03 -0500)]
Add initial checksum support for the gdt_checksum/uninit_group feature
- Add support for computing CRC-16 value.
- Add call to check/verify/set csum on block_groups.
- Add a test program to verify csum operations.
Signed-off-by: Jose R. Santos <jrs@us.ibm.com>
Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Thu, 20 Mar 2008 19:31:03 +0000 (15:31 -0400)]
Merge branch 'maint' into next
Theodore Ts'o [Thu, 20 Mar 2008 14:57:55 +0000 (10:57 -0400)]
debugfs: Don't use a pager if stdout is not a tty
If we are redirecting the output of debugfs to a file or to another
process via a pipe, there's no point sending the output to a pager.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Philipp Thomas [Tue, 18 Mar 2008 18:36:12 +0000 (14:36 -0400)]
po: update de.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Tue, 18 Mar 2008 03:17:13 +0000 (23:17 -0400)]
Fix miscellaneous gcc -Wall warnings
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sat, 15 Mar 2008 15:16:56 +0000 (11:16 -0400)]
Change valgrind options in test_script to conform with valgrind 3.2.3
Newer versions of valgrind seem to have renamed --wierd-hacks to
--sim-hints.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Andreas Dilger [Sat, 2 Feb 2008 08:25:03 +0000 (01:25 -0700)]
Add support for the DIR_NLINK feature.
This patch includes the changes required to e2fsck to understand the
nlink count changes made in the kernel.
In e2fsck pass 4, when we fetch the actual link count, if it is
exceeds 65,000 we set the link count to 1. We silently fix the
situation where the nlink count of the directory is 1, and there are
fewer than 65,000 subdirectories, since since that can happen
naturally.
Patch originally from CFS, significantly rewritten by Theodore Ts'o.
Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: Kalpak Shah <kalpak@clusterfs.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Thu, 13 Mar 2008 17:37:29 +0000 (13:37 -0400)]
libext2fs: Make icount use a 32-bit counter
In order to more accurately count the number of directories, which
with the DIR_NLINKS feature can now be greater than 65,000, change
icount to use a 32-bit counter. This doesn't cost us anything extra
when the icount data structures are stored in memory, since due to
padding for alignment reasons.
If the actual count is greater than 65,500, we return 65,500. This is
because e2fsck doesn't actually need to know the exact count; it only
needs to know if the number of subdirectories is greater than 65,000.
In the future if someone really needs to know the exact number, we
could add a 32-bit interface. One isn't needed now, though.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Josef Bacik [Thu, 13 Mar 2008 17:46:10 +0000 (13:46 -0400)]
resize2fs: Add options to print (and resizing to) the minimum filesystem size
Add the -P option to print the minimum filesystem size and exit.
Add the -M option to force resizing the filesystem to the minimum
filesystem size.
Signed-off-by: Josef Back <jbacik@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sat, 15 Mar 2008 05:27:08 +0000 (01:27 -0400)]
Merge branch 'maint'
Theodore Ts'o [Sat, 15 Mar 2008 05:25:51 +0000 (01:25 -0400)]
ext2_fs.h: Rename EXT4_ORPHAN_FS to be EXT3_ORPHAN_FS
No application will ever use the ORPHAN_FS flag, since it only shows
up in kernel memory, but it's been pointed out it was first used in
ext3, and so it should be renamed for accuracy.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Fri, 14 Mar 2008 18:29:51 +0000 (14:29 -0400)]
Update release notes and debian changelog for 1.40.8-2 release
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Fri, 14 Mar 2008 19:13:45 +0000 (15:13 -0400)]
debian: Remove preinstall script which is no longer necessary
The preinstall script checked for dpkg --asert-support-predepends,
which has been true since 1996. Also it removed configuration files
which haven't been around since well before Debian sarge, more than
two stable releases ago.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>