Age | Commit message (Collapse) | Author |
|
will make pedro happy too (;
|
|
When the softupdates worklist gets too long, threads that attempt to
add more work are forced to process two worklist items first.
However, processing an item may generate additional work, causing the
unlucky thread to recursively process the worklist. Add a per-thread
flag to detect this situation and avoid the recursion. This should
fix the stack overflows that could occur while removing large
directory trees.
pedro@ tedu@ ok
|
|
and do not perform synchronous sync there is no wait requested by
skipping the drain_output() call. this fixes a problem where
update kthread would sleep forever on some vnode since work is created
faster than it can be flushed. pedro@ ok; tested by many
|
|
the softdep stubs which get optimized out when DOINGSOFTDEP evaluates to zero
at compile time and thus are never ever invoked; ok deraadt@
|
|
and remove the corresponding panics in low level code.
ok pedro@ weingart@
|
|
After a rmdir()ed directory has been truncated, force an update of
the directory's inode after queuing the dirrem that will decrement
the parent directory's link count. This will force the update of
the parent directory's actual link to actually be scheduled. Without
this change the parent directory's actual link count would not be
updated until ufs_inactive() cleared the inode of the newly removed
directory, which might be deferred indefinitely. ufs_inactive()
will not be called as long as any process holds a reference to the
removed directory, and ufs_inactive() will not clear the inode if
the link count is non-zero, which could be the result of an earlier
system crash.
If a background fsck is run before the update of the parent directory's
actual link count has been performed, or at least scheduled by
putting the dirrem on the leaf directory's inodedep id_bufwait list,
fsck will corrupt the file system by decrementing the parent
directory's effective link count, which was previously correct
because it already took the removal of the leaf directory into
account, and setting the actual link count to the same value as the
effective link count after the dangling, removed, leaf directory
has been removed. This happens because fsck acts based on the
actual link count, which will be too high when fsck creates the
file system snapshot that it references.
This change has the fortunate side effect of more quickly cleaning
up the large number dirrem structures that linger for an extended
time after the removal of a large directory tree. It also fixes a
potential problem with the shutdown of the syncer thread timing out
if the system is rebooted immediately after removing a large directory
tree.
|
|
stuff that relies on ffs_update() to flush an inode will fail.
Fixes PR 4997, okay tedu@
|
|
|
|
kernels and old tools are safe.
i'm leaving in the "updated" flag, so that fsck will continue to remove
it from filesystems. the kernel no longer attempts to upgrade
superblocks and will use the old format.
post-mortem discussions have concluded that maybe jamming ffs2 fields
into random locations in the superblock is asking for trouble, and we
need to talk about this some more. my bad for not thinking fast enough.
|
|
|
|
|
|
|
|
|
|
- Insert some comments and space the code to improve readability
- Make sure the inode's gen number is always positive (from NetBSD)
|
|
|
|
|
|
couple of new fields needed by FFS2, no functional change.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Silent okay after almost 3 weeks, hackers@.
|
|
|
|
|
|
Thanks to all those who tested.
|
|
Various testing for a while, okay krw@
|
|
- Bring back '&& !ronly' into the conditional, so these ancient file
systems can be mounted again read-only (requested by millert@)
|
|
rotational layout tables. Okay krw@
|
|
rotationally optimal blocks. There's no point in doing that anymore.
Okay beck@, marco@, tedu@ and krw@. Various testing for a while.
|
|
unmounting rw mounts on top of ro devices; pedro@ ok and comments
|
|
|
|
location, testing krw@ and moritz@, thanks.
|
|
No functional change, okay tedu@.
|
|
Instead of having the dinode inside the inode structure itself, we now
have just a pointer to it, and use a separate pool to allocate dinodes
as needed. Inspiration from FreeBSD, various testing for a while, thanks.
|
|
|
|
Diff from Iruata Souza, thanks.
|
|
|
|
anymore. Testing by jolan@, thanks.
|
|
|
|
since we won't use that information.
- Don't call getnanotime() a second time for IN_CHANGE inodes.
- Space the code a bit, so it's actually readable.
Testing jolan@ and krw@, okay krw@.
|
|
|
|
|
|
|
|
Based on a similar change made to NFS. Tested by many, thanks.
|
|
|
|
Issued noted and fix okay'd by otto@.
|