OSDN Git Service
Theodore Ts'o [Mon, 7 Jul 2008 00:24:29 +0000 (20:24 -0400)]
mke2fs: Use a fs_type of 'journal' when creating an external journal
If creating a an external journal via "mke2fs -O journal_dev",
override the fs_type list (i.e., "ext2", "small"), and replace it with
an fs_type list of "journal". This will prevent external journals
smaller than 512MB from being created with a block size of 1k, which
is not very useful and leads to much confusion.
Addresses-Debian-Bug: #488663
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 6 Jul 2008 22:50:44 +0000 (18:50 -0400)]
badblocks: Fix crash when lots of -t patterns given
With more than 8 -t patterns given, badblocks will overwrite the
t_patts array boundary due to realloc not taking into account the size
of an int. Oops.
Addresses-Debian-Bug: 487298
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Eric Sandeen [Sun, 6 Jul 2008 22:36:56 +0000 (18:36 -0400)]
Clean up some trivial build warnings
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 29 Jun 2008 02:09:43 +0000 (22:09 -0400)]
blkid: Eliminate stale entries that duplicate a verified device
Addresses-Debian-Bug: #487758, #487783
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 29 Jun 2008 01:02:01 +0000 (21:02 -0400)]
blkid: Make sure a device returned by blkid_find_dev_with_tag exists
There could be stale entries in blkid file, so if the device does not
exist, skip it.
Addresses-Debian-Bug: #487758, #487783
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Eric Sandeen [Sat, 21 Jun 2008 03:32:49 +0000 (22:32 -0500)]
blkid: use list_for_each_safe in garbage collection
We need to use list_for_each_safe in case a device gets removed from
the list during garbage collection.
Also make the manpage slightly more informative about
what the -g garbage collection option does.
Addresses-Debian-Bug: #487758, #487783
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Benno Schulenberg [Tue, 24 Jun 2008 01:35:08 +0000 (21:35 -0400)]
po: update nl.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Petr Pisar [Tue, 24 Jun 2008 01:35:07 +0000 (21:35 -0400)]
po: update cs.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Mon, 23 Jun 2008 18:10:43 +0000 (14:10 -0400)]
libext2fs: Don't include ss/ss.h except when debugging
extent.c should only try to include ss/ssh.h when it is compiled with
-DDEBUG. Otherwise it's not necessary and it breaks the Debian MIPS
build (and the Debian MIPS build only) because it tries to build
libext2fs without building libss as part of a MIPS-specific build
rule.
Addresses-Debian-Bug: #487675
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Mon, 23 Jun 2008 15:57:54 +0000 (11:57 -0400)]
debian: parse /etc/adduser.conf file manually
The syntax for /etc/adduser.conf allows spaces around the equals sign,
i.e.:
GROUPHOMES = no
We were previously asking /bin/sh to source the file, which doesn't
support the above syntax. So pull out the necessary fields via
sed/grep.
Thanks to Juan A. Diaz for reporting the bug and suggesting the fix.
Addresses-Debian-Bug: #487443
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Iustin Pop [Wed, 18 Jun 2008 20:26:26 +0000 (22:26 +0200)]
badblocks: fix a bug in the read throttling
The previous patch was missing an #include and thus the compiler didn't
catch the (now obvious) error.
Signed-off-by: Iustin Pop <iustin@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Clytie Siddall [Sat, 21 Jun 2008 18:06:00 +0000 (14:06 -0400)]
po: update vi.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Jakub Bogusz [Sat, 21 Jun 2008 18:06:00 +0000 (14:06 -0400)]
po: update pl.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Samuel Thibault [Sat, 21 Jun 2008 18:06:00 +0000 (14:06 -0400)]
po: update fr.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Benno Schulenberg [Sat, 21 Jun 2008 18:06:00 +0000 (14:06 -0400)]
po: update es.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Philipp Thomas [Sat, 21 Jun 2008 18:06:00 +0000 (14:06 -0400)]
po: update de.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
David Planella Molas [Sat, 21 Jun 2008 18:05:59 +0000 (14:05 -0400)]
po: update ca.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Sat, 21 Jun 2008 18:04:36 +0000 (14:04 -0400)]
blkid: Fix cc portability problem in probe_lvm2()
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Eric Sandeen [Wed, 18 Jun 2008 19:58:55 +0000 (14:58 -0500)]
blkid: fix swap tests (again)
Some architectures (ppc ...) need a bigger swapfile than is shipped,
in the test image so the current re-make of swap was failing.
We could either ship a bigger image or just dd a bigger file...
There is one more minor problem with the tests; older mkswap does not
support the -U uuid specification. I'm not sure offhand what to do
about that problem, or if it really needs fixing.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Thu, 19 Jun 2008 14:09:08 +0000 (10:09 -0400)]
Fix "make check" in e2fsck subdirectory to use the in-tree com_err library
Thanks to Jose Santos for pointing this out
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Eric Sandeen [Wed, 18 Jun 2008 21:16:35 +0000 (16:16 -0500)]
Add e2undo files to the RPM specfile template
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Wed, 18 Jun 2008 15:27:21 +0000 (11:27 -0400)]
Add a reference to e2fsck.conf(5) to the e2fsck man page
Addresses-Debian-Bug: #393313
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Wed, 18 Jun 2008 10:50:34 +0000 (06:50 -0400)]
Update e2fsprogs.pot and POTFILES.in
This is to allow the translation project to get started on translating
messages for e2fsprogs 1.41.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Wed, 18 Jun 2008 04:50:05 +0000 (00:50 -0400)]
Update release notes for debian experimental package
Theodore Ts'o [Wed, 18 Jun 2008 03:54:51 +0000 (23:54 -0400)]
Merge branch 'maint'
Conflicts:
README
resize/online.c
version.h
Theodore Ts'o [Wed, 18 Jun 2008 02:17:09 +0000 (22:17 -0400)]
Update release notes, changelog, and other files for v1.40.11 release
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Wed, 18 Jun 2008 01:55:38 +0000 (21:55 -0400)]
Clarify the debugfs man page regarding the default superblock
Addresses-Debian-Bug: #486463
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Tue, 17 Jun 2008 23:58:29 +0000 (19:58 -0400)]
mke2fs, tune2fs, resize2fs: Use floating point to calculate percentages
When calculating the number reserved blocks, use floating point for
better accuracy, since for big filesystems it really makes a
difference. In addition, mke2fs and tune2fs accepts a floating point
number from the user, so they should provide that level of accuracy.
Addresses-Debian-Bug: #452639
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Tue, 17 Jun 2008 17:03:47 +0000 (13:03 -0400)]
libblkid: Fix marginal C code in probe_lvm2()
Modern gcc accepted what was there previously, but it's clearly not
correct C code, and this may have been the explanation for why a user
trying to compile a recent version of e2fsprogs failed to do so on Red
Hat 7.3.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Tue, 17 Jun 2008 11:48:59 +0000 (07:48 -0400)]
Update version.h for 1.41-WIP-0617 snapshot release
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Iustin Pop [Thu, 12 Jun 2008 07:30:04 +0000 (09:30 +0200)]
badblocks: implement read throttling
Currently, badblocks will read as fast as it can from the drive. While
this is what one wants usually, if badblocks is run in read-only mode on
a drive that is in use, it will greatly degrade the other users of this
disk.
This patch adds a throttling mode for reads where each read will be
delayed by a percentage of the time the previous read took; i.e., an
invocation of '-d 100' will cause the sleep to be the same as the read
took, a value of 200 will cause the sleep to be twice as high, and a
value of 50 will cause it to be half. This will not be done if the
previous read had errors, since then the hardware will possibly have
timeouts and that would decrease the speed too much.
This algorithm helps when the disk is used by other processes as then,
due to the increased load, the time spent doing the reads will be
higher, and correspondingly badblocks will sleep even more and thus it
will use less of the drive's bandwidth. This is different from using
ionice, as it is a voluntary (and partial) throttling.
Signed-off-by: Iustin Pop <iustin@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Iustin Pop [Wed, 11 Jun 2008 15:55:18 +0000 (17:55 +0200)]
badblocks: fix a possible bug in parse_uint
Currently, the parse_uint() function checks errno after the strtoul()
call. But, according to the man page of strtoul():
Since strtoul() can legitimately return 0 or LONG_MAX (LLONG_MAX for
strtoull()) on both success and failure, the calling program
should set errno to 0 before the call, and then determine if an error
occurred by checking whether errno has a nonzero value after the call.
When using locales, it can happen that looking for the locale files is
not successful, and therefore errno will have a nonzero value from this.
And since the argument parsing is one of the first things done after
startup, parse_uint() will wrongly report errors.
The fix is to simply reset errno to zero before calling strtoul().
Signed-off-by: Iustin Pop <iustin@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Iustin Pop [Wed, 11 Jun 2008 11:12:17 +0000 (13:12 +0200)]
badblocks: add a max bad blocks count option
Currently, badblocks will continue scanning the device until it reaches
last_block, even though it might be that the drive is not responding
at all anymore.
This patch introduces a new parameter ('-e') that allows one to specify
the maximum bad block count; if badblocks sees more than this number, it
will abort the test.
While this is not useful for testing a device that will need to be used
as a filesystem (because we don't get an exhaustive list of bad blocks),
it is useful for testing if a device has bad blocks at all: for example,
with a count of 1, it will finish after the first error thus not needing
to test the whole device if the only purpose of the test is to check for
any bad blocks.
Signed-off-by: Iustin Pop <iustin@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Tue, 17 Jun 2008 05:53:53 +0000 (01:53 -0400)]
resize2fs: Prohibit the combination of flex_bg and !resize_inode
This is a potentially a difficult case for resize2fs to handle, so
prohibit it for now.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Tue, 17 Jun 2008 04:18:58 +0000 (00:18 -0400)]
ext2fs_zero_blocks: Avoid clearing more blocks than requested
This could cause certain mke2fs feature combinations to result in the
initial blocks of the inode table getting wiped out when the journal
is created.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Tue, 17 Jun 2008 02:13:55 +0000 (22:13 -0400)]
resize2fs: Fix support for the uninit_bg feature
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
David Planella Molas [Sun, 8 Jun 2008 13:28:52 +0000 (09:28 -0400)]
po: update ca.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Sun, 8 Jun 2008 02:30:22 +0000 (22:30 -0400)]
Update tests to reflect undoe2fs -> e2undo rename
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 8 Jun 2008 02:18:23 +0000 (22:18 -0400)]
Fix LIBSS dependency problem for tests/test_icount and lib/ss/test_ss
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 8 Jun 2008 02:16:48 +0000 (22:16 -0400)]
e2undo: Enable missing pieces to enable I18N for this application
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 8 Jun 2008 02:07:50 +0000 (22:07 -0400)]
Add "#include <limits.h>" to get PATH_MAX for mke2fs and tune2fs
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 8 Jun 2008 02:07:25 +0000 (22:07 -0400)]
Merge branch 'maint'
Theodore Ts'o [Sun, 8 Jun 2008 01:53:35 +0000 (21:53 -0400)]
Fix dependency for $(LIBSS) when an explicit dlopen() library is needed
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sat, 7 Jun 2008 23:01:46 +0000 (19:01 -0400)]
fsck: Fix build problem on MacOS X
Addresses-Sourceforge-Bug: #
1972473
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sat, 7 Jun 2008 17:13:16 +0000 (13:13 -0400)]
resize2fs: Add support to use the ext4 online resize ioctl's
First try the ext3 ioctl, but if we get an error, try using the ext4
ioctl.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sat, 7 Jun 2008 16:19:08 +0000 (12:19 -0400)]
e2fsck: Add better explanatory message when s_lastcheck is in the future
Addresses-Debian-Bug: #446005
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sat, 7 Jun 2008 15:56:23 +0000 (11:56 -0400)]
Update Makefile dependencies for lib/ext2fs
Theodore Ts'o [Sat, 7 Jun 2008 15:53:56 +0000 (11:53 -0400)]
Fix gcc -Wall warnings in libext2fs
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sat, 7 Jun 2008 15:53:20 +0000 (11:53 -0400)]
Fix gcc -Wall warnings in libuuid
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sat, 7 Jun 2008 15:52:33 +0000 (11:52 -0400)]
Fix gcc -Wall warnings in resize2fs
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sat, 7 Jun 2008 15:51:33 +0000 (11:51 -0400)]
Fix gcc -Wall warnings in tune2fs
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sat, 7 Jun 2008 15:04:10 +0000 (11:04 -0400)]
Fix gcc -Wall warnings in e2fsck
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sat, 7 Jun 2008 14:08:48 +0000 (10:08 -0400)]
Merge branch 'maint'
Conflicts:
configure
Theodore Ts'o [Sat, 7 Jun 2008 12:55:21 +0000 (08:55 -0400)]
Fix ext2fs_swap{16,32,64} for external applications on big-endian machines
The public header files depend on the the autoconf defines
WORDS_BIGENDIAN and HAVE_SYS_TYPES_H, so we add them to ext2_types.h
so that external programs which try to use ext2fs_swap*() will work
correctly on big-endian systems. Fortunately, few if any programs
need to use this libext2's byte-swap functions directly.
Addresses-Debian-Bug: #484879
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Fri, 23 May 2008 05:00:19 +0000 (01:00 -0400)]
e2fsck: Add support to check journal checksums
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sat, 24 May 2008 02:02:05 +0000 (22:02 -0400)]
Add CRC32 (big-endian) routine for use by journal checksums
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sat, 24 May 2008 01:35:50 +0000 (21:35 -0400)]
Re-enable byte-swapping functions for use by journal checksums
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Aneesh Kumar K.V [Wed, 4 Jun 2008 09:01:23 +0000 (14:31 +0530)]
libext2fs: Fix build failure on powerpc in ext2fs_swap_inode_full()
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 [Tue, 3 Jun 2008 01:40:02 +0000 (21:40 -0400)]
Merge branch 'maint' into next
Theodore Ts'o [Tue, 3 Jun 2008 01:37:06 +0000 (21:37 -0400)]
debian: Improve uuid-runtime package description
Addresses-Debian-Bug: #483962
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Tue, 3 Jun 2008 01:20:34 +0000 (21:20 -0400)]
debian: Improve e2fsprogs package description
Addresses-Debian-Bug: #483023
Benno Schulenberg [Tue, 3 Jun 2008 01:13:36 +0000 (21:13 -0400)]
po: update es.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Ricardo M. Correia [Fri, 30 May 2008 18:20:47 +0000 (19:20 +0100)]
Add ZFS detection to libblkid
This patch adds ZFS filesystem detection to libblkid.
It probes for VDEV_BOOT_MAGIC in the first 2 ZFS labels in big-endian
and little-endian formats.
Unfortunately the probe table doesn't support probing from the end of
the device, otherwise we could also probe in the 3rd and 4th labels (in
case the first 2 labels were accidentally overwritten)..
Eventually we would set the UUID from the ZFS pool GUID and the LABEL tag
from the pool name, but that requires parsing an XDR encoding of the pool
configuration which is not trivial.
Signed-off-by: Ricardo M. Correia <Ricardo.M.Correia@Sun.COM>
Signed-off-by: Andreas Dilger <adilger@sun.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Tue, 3 Jun 2008 00:36:52 +0000 (20:36 -0400)]
f_extents2: Add new test case testing e2fsck's support for extents
This test case tests blocks claimed by multiple inodes, as well as
other forms of invalid extents.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Tue, 3 Jun 2008 00:12:34 +0000 (20:12 -0400)]
e2fsck: Detect unordered extents in an extent node
The logical block numbers must be monotonically increasing, and there
must not be any overlapping extents. If any are found, report them as
filesystem corruption.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Mon, 2 Jun 2008 21:27:59 +0000 (17:27 -0400)]
e2fsck: Wire up callback functions for _alloc_block() and _block_alloc_stats()
Wire up callback functions for ext2fs_alloc_block() and
ext2fs_block_alloc_stats() so that we use the ctx->block_found_map
block bitmap to determine which new block we should allocate, and then
to update the block_found_map bitmap if the extent functions need to
allocate or release blocks.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Mon, 2 Jun 2008 21:21:37 +0000 (17:21 -0400)]
libext2fs: Add callback functions for _alloc_block() and _block_alloc_stats()
Add callback functions for ext2fs_alloc_block() and
ext2fs_block_alloc_stats(). This is needed so e2fsck can be informed
when the extent_set_bmap() function needs to allocate or deallocate
blocks.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Tue, 27 May 2008 11:00:48 +0000 (07:00 -0400)]
Wire ext2fs_bmap2() to use ext2fs_extent_set_bmap()
This commit enables read/write access via the ext2fs_bmap2() interface
for extent-based inodes.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Tue, 27 May 2008 10:59:32 +0000 (06:59 -0400)]
Wire ext2fs_block_iterate2() to use ext2fs_extent_set_bmap()
This commit enables read/write access via the block iterator for
extent-based inodes.
Also fixed some bugs regarding the handling on non-leaf extent nodes
when iterating over extents in a file.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Eric Sandeen [Tue, 20 May 2008 21:13:41 +0000 (16:13 -0500)]
Teach ext2fs_extent_delete() to remove an empty extent node from the tree
ext2fs_extent_delete() will also update the parent node and decrement
the inode block count.
Passing in the EXT2_EXTENT_DELETE_KEEP_EMPTY flag will allow the empty
node to remain.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Eric Sandeen [Tue, 20 May 2008 15:17:46 +0000 (10:17 -0500)]
libext2fs: add new function ext2fs_extent_set_bmap()
Allows unmapping or remapping single mapped logical blocks,
and mapping currently unmapped blocks.
Also implements ext2fs_extent_fix_parents() to fix parent
index logical starts, if the first index of a node changes
its logical start block.
Currently this can result in unnecessary new single-block extents; I
think perhaps ext2fs_extent_insert should grow a flag to request
merging with a nearby extent?
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Eric Sandeen [Tue, 20 May 2008 15:15:27 +0000 (10:15 -0500)]
Teach ext2fs_extent_insert() to split the current node if necessary
If ext2fs_extent_insert finds that the requested node
for insertion is full, it will currently fail.
With this patch it will split as necessary to make room, unless an
EXT2_EXTENT_INSERT_NOSPLIT flag is passed to it.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Eric Sandeen [Tue, 20 May 2008 15:14:20 +0000 (10:14 -0500)]
libext2fs: Teach extent.c how to split nodes
When called for a given handle, the new function extent_node_split()
will split the current node such that half of the node's entries will
be moved to a new tree block. The parent will then be updated to
point to the (now smaller) original node as well as the new node.
If the root node is requested to be split, it will move all
entries out to a new node, and leave a single entry in the
root pointing to that new node.
If the reqested split node's parent is full it will recursively
split up to the root to make room for the new node's insertion.
If you ask to split a non-root node with only one entry,
it will refuse (we'd have an empty node otherwise).
It also updates the i_blocks count when a new block has
successfully been connected to the tree.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Mon, 2 Jun 2008 04:08:19 +0000 (00:08 -0400)]
ext2fs_extent_open: If the inode is empty, initialize the extent tree
If the inode's i_block[] array is completely empty, create an empty
extent tree in the in-core inode and set the EXT4_EXTENT_FL inode
flag. This makes it easy to create a new inode using extents.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Mon, 2 Jun 2008 02:56:37 +0000 (22:56 -0400)]
ext2fs_extent_replace: Support uninit extents and check validity of e_len
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Fri, 30 May 2008 19:23:24 +0000 (15:23 -0400)]
e2fsck: Don't double count an extent after deleting the last extent
ext2fs_extent_delete() will leave the extent handle pointing at the
next extent --- except if the last extent in the node. To deal with
this last case, call ext2fs_get_extent_info() and stop scanning after
processing info->num_entries extents.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Wed, 28 May 2008 08:54:44 +0000 (04:54 -0400)]
e2fsck: Don't skip an extent after deleting an invalid extent
ext2fs_delete_extent() deletes the current extent and moves to the
next extent (if present). So we need to skip moving to the next
extent and get the (new) current extent and check it before moving on.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 25 May 2008 23:45:29 +0000 (19:45 -0400)]
Remove bashism in test script for libblkid
Thanks to Christian Kujau for pointing this out.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sat, 24 May 2008 23:17:01 +0000 (19:17 -0400)]
Add 64-bit support to the test_io manager
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sat, 24 May 2008 23:10:49 +0000 (19:10 -0400)]
Fix m_large_file and r_inline_xattr tests to match with recent changes
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Wed, 21 May 2008 20:56:42 +0000 (16:56 -0400)]
Merge branch 'maint'
Conflicts:
README
version.h
Theodore Ts'o [Wed, 21 May 2008 17:23:04 +0000 (13:23 -0400)]
Update release notes and debian changelog for 1.40.10 release
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Maciej W. Rozycki [Tue, 20 May 2008 23:38:12 +0000 (00:38 +0100)]
Remove default sizeof sizes in configure script when cross-compiling
Since version 2.50 autoconf fully supports checking sizes of types
(with AC_CHECK_SIZEOF) when cross-compiling. Therefore there is no
need to preset the respective cache variables anymore. The following
patch removes the special case. There is no need to adjust AC_PREREQ
as it's set to 2.50 already.
Tested successfully cross-building for the mips64el-linux-gnu host on
an i386-linux-gnu build system, removing the following warning
(because of a mismatch for the "long" type):
Sizeof(__U64__TYPEDEF) is 4 should be 8
Problem detected with asm_types.h
Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Tue, 20 May 2008 21:28:54 +0000 (17:28 -0400)]
blkid: If the device mtime is newer that the cache time, force a revalidation
This fixes problems turned up by a test case written by Erez Zadok's
group which constantly reformats filesystems.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Tue, 20 May 2008 18:51:14 +0000 (14:51 -0400)]
e2fsck: Fix potential data corruptor bug in journal recovery
While synchronizing e2fsck's recovery.c with the latest 2.6 kernel
sources, I discovered a serious bug that apparently had been fixed in
the kernel sometime between Deceber 2003 and April 2005, but which had
not been carried over to e2fsprogs. Specifically, when blocks whose
first 4 bytes are JFS_MAGIC_NUMBER (0xc03b3998) are written into the
journal, the first 4 bytes zero'ed out. A one character typo meant
that when the blocks were replayed by e2fsck, the JFS_MAGIC_NUMBER
would not be restored.
Oops.
Fortunately, it is *highly* unlikely that ext4 metadata blocks will
contain that magic number in the first four bytes, and data=journalled
is a relatively rarely used.
This commit fixes this bug, as well as updating e2fsck's recovery.c to
be in sync with 2.6.25.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Fri, 16 May 2008 02:17:06 +0000 (22:17 -0400)]
debugfs: Print the nanosecond field and i_version field of an inode
Add support for dumping out the new inode fields added in ext4
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Fri, 16 May 2008 02:14:52 +0000 (22:14 -0400)]
ext2fs.h: Add l_i_file_acl_high and l_version_hi to on-disk inode structure
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Clytie Siddall [Wed, 14 May 2008 22:42:45 +0000 (18:42 -0400)]
po: update vi.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Göran Uddeborg [Wed, 14 May 2008 22:42:45 +0000 (18:42 -0400)]
po: update sv.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Benno Schulenberg [Wed, 14 May 2008 22:42:45 +0000 (18:42 -0400)]
po: update nl.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Philipp Thomas [Wed, 14 May 2008 22:42:45 +0000 (18:42 -0400)]
po: update de.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Wed, 14 May 2008 22:23:47 +0000 (18:23 -0400)]
Install {mkfs,fsck}.{ext4,ext4dev} binary and man pages
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Wed, 14 May 2008 22:23:16 +0000 (18:23 -0400)]
Add ext4dev stanza to mke2fs.conf
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Wed, 14 May 2008 22:09:37 +0000 (18:09 -0400)]
mke2fs: Add the ability to configure default extended options in mke2fs.conf
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Eric Sandeen [Mon, 12 May 2008 23:13:49 +0000 (18:13 -0500)]
fix extent_goto for non-0 leaf levels
The logic for stopping at the right level in extent_goto was wrong,
so if you asked it to go to any level other than 0 (the leaf
level) it would fail.
Also add this argument to the tst_extents goto command to test it.
(I thought this was a failure in my split code but it was this
helper that was causing problems...)
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Eric Sandeen [Mon, 12 May 2008 18:26:51 +0000 (13:26 -0500)]
- fix swap sanity tests in blkid, and blkid tests
Swap is actually native-endian on disk, and with the latest
swapspace sanity checks I added we need to have native swapspace
examples in the blkid tests, so re-mkswap them during testing.
One one other required change, though; mkswap requires at least
10 pages of swap, so the image needs to be increased to 10x64k
if mkswap is to succeed...
Maybe it'd be better to just dd it out on the fly?
Addresses-redhat-bugzilla: 445786
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Mon, 12 May 2008 13:51:17 +0000 (09:51 -0400)]
Fix German translation bug (y,n) -> (j,n)
Addresses-Sourceforge-Bug: #
1961831
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Matthias Koenig [Tue, 6 May 2008 11:38:31 +0000 (13:38 +0200)]
libuuid: don't use unitialized variable
Signed-off-by: Matthias Koenig <mkoenig@suse.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Mon, 12 May 2008 00:34:12 +0000 (20:34 -0400)]
Fix parallel build problem
Problem was introduced by commit
a4b69b7f1809898c87bdc11502ca258a8f16a220
Thanks to Eric Sandeen from Red Hat for pointing out this problem.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Mon, 28 Apr 2008 02:40:17 +0000 (22:40 -0400)]
Update version.h and README for 1.41-WIP-0427 release
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>