Commit Graph

2504 Commits (205372e24f90d93e55a25c6176bc55a94d304450)

Author SHA1 Message Date
Theodore Ts'o 205372e24f Add new test case to check e2fsck's response to fast symlinks w/ EXTENTS_FL
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-03-24 08:24:45 -04:00
Theodore Ts'o cb23cad5b7 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>
2008-03-24 08:17:24 -04:00
Eric Sandeen 85b59c40f4 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>
2008-03-20 15:45:27 -04:00
Jose R. Santos 635e20abc1 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>
2008-03-20 15:33:13 -04:00
Jose R. Santos d2e29c950d 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>
2008-03-20 15:33:12 -04:00
Jose R. Santos 49a7360ba6 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>
2008-03-20 15:33:12 -04:00
Jose R. Santos 8fdf29117f 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>
2008-03-20 15:33:12 -04:00
Jose R. Santos 236efede19 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>
2008-03-20 15:33:12 -04:00
Jose R. Santos 777a8c1bf0 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>
2008-03-20 15:33:12 -04:00
Jose R. Santos 4e988cb4c1 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>
2008-03-20 15:33:12 -04:00
Jose R. Santos d2d22a29df 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>
2008-03-20 15:33:12 -04:00
Jose R. Santos 3542ba0d37 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>
2008-03-20 15:33:12 -04:00
Jose R. Santos d4f34d41be 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>
2008-03-20 15:33:12 -04:00
Jose R. Santos ca2634a46a 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>
2008-03-20 15:32:11 -04:00
Theodore Ts'o abe85c9f1b Merge branch 'maint' into next 2008-03-20 15:31:03 -04:00
Theodore Ts'o a7ee4e0183 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>
2008-03-20 10:57:55 -04:00
Philipp Thomas 1e8757dd5e po: update de.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2008-03-18 14:36:12 -04:00
Theodore Ts'o 2d328bb76d Fix miscellaneous gcc -Wall warnings
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-03-17 23:17:13 -04:00
Theodore Ts'o 35efa44d49 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>
2008-03-15 11:16:56 -04:00
Andreas Dilger a7c9cb7d0d 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>
2008-03-15 01:39:19 -04:00
Theodore Ts'o 60bbd1af53 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>
2008-03-15 01:39:19 -04:00
Josef Bacik 199ddaaa44 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>
2008-03-15 01:30:43 -04:00
Theodore Ts'o 6567e5a684 Merge branch 'maint' 2008-03-15 01:27:08 -04:00
Theodore Ts'o a80f3694a7 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>
2008-03-15 01:25:51 -04:00
Theodore Ts'o 5e107624d4 Update release notes and debian changelog for 1.40.8-2 release
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-03-14 15:18:03 -04:00
Theodore Ts'o 12617a1830 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>
2008-03-14 15:16:42 -04:00
Matthias Koenig 4415b03eaa uuidd: Fix issues identified by SuSE's security team
SuSE's security team audited uuidd and came up with these issues.
None of them are serious given that uuidd runs setuid as a
unprivileged user which has no special access other than libuuid
directory, but it's good to get them fixed.

Signed-off-by: Matthias Koenig <mkoenig@suse.de>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-03-14 14:38:42 -04:00
Eric Sandeen 82e541885e Fix ext2fs_swap_inode_full() for in-inode xattrs on big-endian machines
After the fix for resize2fs's inode mover losing in-inode
extended attributes, the regression test I wrote caught
that the attrs were still getting lost on powerpc.

Looks like the problem is that ext2fs_swap_inode_full()
isn't paying attention to whether or not the EA magic is
in hostorder, so it's not recognized (and not swapped)
on BE machines.  Patch below seems to fix it.

Yay for regression tests.  ;)

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2008-03-14 14:32:53 -04:00
Theodore Ts'o 252b736369 libext2fs: Fix fencepost error in ext2fs_extent_insert()
ext2fs_extent_insert() was copying n-1 of the existing extents when
moving things down to make room for the new extent.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-03-14 10:42:50 -04:00
Theodore Ts'o 83d9be1d5d libext2fs: Fix ext2fs_extent_delete() to always point at a valid entry
When deleting the last entry in a node, back up the current pointer so
it is always pointing at a valid entry.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-03-13 23:55:40 -04:00
Theodore Ts'o ee19c902e6 e2fsck: Check for fast symlinks that have EXTENTS_FL set
These shouldn't show up in the wild, but if they do, e2fsck will offer
to clear them.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-03-13 23:13:18 -04:00
Theodore Ts'o 7cadc57780 e2fsck: Support long symlinks which use extents
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-03-13 23:05:00 -04:00
Theodore Ts'o da078326b6 Update release notes, version files for 1.40.8 release
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-03-13 20:25:51 -04:00
Theodore Ts'o 54d1342deb Don't fail the "make install" if the info files have not been built
We don't fail the "make all" if the "makeinfo" command isn't there, so
we shouldn't fail the "make install", either.

Addresses-Sourceforge-Bug: #1586610

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-03-13 18:52:18 -04:00
Philipp Thomas ba71e3ea1b po: update de.po (from translationproject.org)
Addresses-Debian-Bug: #302512
Addresses-Debian-Bug: #370247
Addresses-Debian-Bug: #401092
Addresses-Debian-Bug: #412882

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2008-03-13 18:24:29 -04:00
Jose R. Santos 51b263e369 Add {read,write}_blk64 to inode_io.c
Add 64-bit block capable routines to inode IO manager.  Since fileio.c
does not yet have 64bit support, these routines will not handle 64bit
block numbers correctly yet.

Signed-off-by: Jose R. Santos <jrs@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-03-13 13:47:05 -04:00
Jose R. Santos 59ecd32dcb Add {read,write}_blk64 to unix_io.c
Add 64-bit block capable routines to Unix IO manager.

Signed-off-by: Jose R. Santos <jrs@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-03-13 13:46:58 -04:00
Jose R. Santos 3154e1cceb Add 64-bit IO manager operations to struct_io_manager.
In order to provide 64-bit block support for IO managers an maintain
ABI compatibility with the old API, some new functions need to be
added to struct_io_manger.  Luckily, strcut_io_manager has some
reserved space that we can use to add these new functions.

Signed-off-by: Jose R. Santos <jrs@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-03-13 13:46:44 -04:00
Theodore Ts'o a040a99b6c Merge branch 'maint'
Conflicts:

	lib/ext2fs/ext2_err.et.in
2008-03-13 10:53:26 -04:00
Theodore Ts'o 2a60480627 e2fsck: Use "Clear Htree" instead of "Clear" when the Htree is corrupt
Change the prompt so it is clear to the user that e2fsck will be
clearing the htree information, not the directory inode itself, when
the htree information has proven to be corrupt.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-03-13 10:44:54 -04:00
Theodore Ts'o 9fbec969a2 e2image: Use open64() so that "e2image -I" works on image files > 2GB
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-03-13 01:03:28 -04:00
Theodore Ts'o 2cd1233839 e2fsck: Fix directory i_size handling
If a directory's i_size is bigger than the number of blocks, don't try
to allocate extra empty blocks to the end of the directory; there's no
real point to do that.  Also, if a directory's i_size is not a
multiple of the blocksize, flag that as a mistake so it can be fixed.

This more elegantly addresses the problem which was found on Bas van
Schaik's filesystem.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-03-13 00:58:54 -04:00
Theodore Ts'o 52b1dd5e49 libext2fs: Add ext2fs_dblist_get_last() and ext2fs_dblist_drop_last()
Add two new functions which allows the caller to examine the last
directory block entry added to the list, and to drop if it necessary.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-03-13 00:34:16 -04:00
Theodore Ts'o d45edec0fb e2fsck: Handle a pass 2 "should never happen" error gracefully
Turns out a "should never happen" error can indeed happen very easily
if a directory with an htree index has an incorrect, and too-large,
i_size field.  This patch fixes this so that we handle this situation
gracefully, allowing filesystems with this error to be fixed.

In another patch I will clean up the specific problem which caused the
internal "should never happen" error from happening at all, but patch
will prevent e2fsck from crashing, and prompt the user to remove the
htree index, so it can be rebuilt again after pass 3.

Thanks to Bas van Schaik at Tetra for giving me access to his system
so this problem could be debugged.

Addresses-Launchpad-Bug: #129395

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-03-12 16:10:48 -04:00
Theodore Ts'o 46d9a7462b e2fsck: Fix obvious typo in an "internal error" message
Thanks to Philipp Thomas for pointing this out.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-03-12 12:12:50 -04:00
Petr Pisar 150ca0b1ee po: update cs.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2008-03-11 12:08:52 -04:00
Clytie Siddall 955195e62f po: update vi.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2008-03-10 15:08:29 -04:00
Gran Uddeborg 0874a38043 po: update sv.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2008-03-10 15:08:29 -04:00
Jakub Bogusz 42e0deac87 po: update pl.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2008-03-10 15:08:29 -04:00
Benno Schulenberg 1baae199c5 po: update nl.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2008-03-10 15:08:29 -04:00