Eric Sandeen [Wed, 23 Jun 2004 05:10:16 +0000 (05:10 +0000)]
Fix check & repair of filesystems w/ realtime vols
use of isset macro was incorrectly checking rt bitmap
use our xfs_isset macro not system's isset,
which assumes a byte-sized bitfield
Russell Cattelan [Fri, 16 Apr 2004 15:56:34 +0000 (15:56 +0000)]
libxfs fix for the dir2 rebalance bug
So this was a fun one to track down.
This bug has existed since version 1.1 of the dir2 code.
xfs_dir2_leafn_rebalance splits a directory tree block into
2 balanced blocks and then calculates the new index in either the
old block or the new block relying on the hash value.
This doesn't work in the case of a new to be inserted elements hash value
being the same as an already existing elements hash value.
This resulted in a negative index being returned and then passed to
xfs_dir2_leafn_add, which it then used as a starting address in
the elements array.
The address (which is now pointing to somebody else's memory) was then
passed to memmove to move the tail of the array down 8 bytes.
Depending on the size of the array this would move all sorts of
possibly important info belong to somebody else 8 bytes down.
As part of the fix add a sanity check to xfs_dir2_leafn_add
to make nobody else is passing in a negative index.
Bill Kendall [Thu, 15 Apr 2004 19:42:58 +0000 (19:42 +0000)]
- Fix file descriptor leak in path_to_fshandle. It now caches
one descriptor per filesystem.
- In xfsrestore, always allocate a fs handle during content_init.
This allows us to not have to call path_to_fshandle before attempting
every open_by_handle.
- Change open_by_fshandle to open_by_handle is cases where we are
passing a file handle (instead of a fshandle).
path_to_fshandle was opening a file and never closing it. We now close it
unless the descriptor is to be used in the descriptor cache. One descriptor
is cached for each unique filesystem that path_to_fshandle is called on.
Glen Overby [Wed, 17 Mar 2004 21:32:49 +0000 (21:32 +0000)]
Define a new superblock field for more feature bits. Take the last
feature bit in sb_versionnum to use to indicate that the new feature
bit field is to be used.
Add new superblock fields for new feature bits.
Some of the libhandle routines were not clear whether they were working
on fshandles or file handles. This mod renames open_by_handle() to
open_by_fshandle() and updates any calling applications to now call
open_by_fshandle() instead. A new open_by_handle() has been created.
path_to_fshandle() was trying to maintain a hash of fshandles but the
hash was only storing a max of 2 fshandles at a time. This has been
fixed so the hash can hold multiple fs handles.
define open_by_fshandle()
ptools [Tue, 10 Feb 2004 03:10:49 +0000 (03:10 +0000)]
Some qa to test out simple replay of the logs by causing
file system to shutdown.
A copy of the kernel header file - modified for XFS_IOC_GOINGDOWN
related macros.
Nathan Scott [Tue, 28 Oct 2003 04:41:37 +0000 (04:41 +0000)]
Rework the mkfs allocation group sizing algorithm, making better use of the available bits. This changes the maximum allocation group size enforced by mkfs to be 1TB (from 4GB), which scales alot better for very large filesystems.
Eric Sandeen [Sun, 19 Oct 2003 02:30:37 +0000 (02:30 +0000)]
Add references to xfs_check & xfs_repair for problems
beyond the scope of normal recovery.
Add references to xfs_check & xfs_repair for problems
beyond the scope of normal recovery.
xfs_repair doesn't handle unwritten real-time extents properly. When
the real-time subvolume extent size is larger than a filesystem block,
it is possible to have a real-time extent that is part written and
part unwritten.
Internally, xfs_repair tracks real-time extent use on a per-extent
basis. Thus, a file that has a written and unwritten extent falling
on the same extent.
This fix addresses this problem specificly by noting when the file
extent is unwritten and covers a partial real-time extent. Then,
instead of checking that it is unused, it checks that it is used.
Nathan Scott [Mon, 15 Sep 2003 05:23:16 +0000 (05:23 +0000)]
xfsprogs update - added code for manipulating additional inode flags, fix up
some logprint bugs (minor), allow growfs to work on device/path now.
bump version, document changes.
Glen Overby [Mon, 18 Aug 2003 20:23:00 +0000 (20:23 +0000)]
mkfs can improperly generate an error when the data subvolume stripe unit is
larger than 256kb, which is larger than the maximum log stripe unit size.
So, only set and check the log stripe unit on version 2 internal logs, and
default the stripe unit size to 32kb if the data volume's stripe unit
size is too big.
Only set and check the log stripe unit on version 2 internal logs, and
default the stripe unit size to 32kb if the data volume's stripe unit
size is too big.
Steve Lord [Wed, 6 Aug 2003 21:17:06 +0000 (21:17 +0000)]
Add versioning to the on disk inode which we increment on each
flush call. This is used during recovery to avoid replaying an
older copy of the inode from the log. We can do this without
versioning the filesystem as the pad space we borrowed was
always zero and will be ignored by old kernels.
Print out the new inode field