This test was failing on my machine when run natively but not causing any
problems when run within qemu, and the failure was "mkdir: No space left
on device".
My understanding of the issue is that this test overflowed the temporary
disk image due to its high rate of file churn and the lfs_cleanerd not
being able to keep up. Note that this test is capped by time, not number
of operations, so this is why the problem does not show up in a slow
emulated system.
To fix this, just bump the test file system image limit a little bit.
(I tried increasing the frequency at which lfs_cleanerd does its thing,
but it wasn't enough.)
Adapt dholland@'s fix to ufs_rename to fix PR kern/43582. Address several
other MP locking issues discovered during the course of investigating the
same problem.
Removed extraneous vn_lock() calls on the Ifile, since the Ifile writes
are controlled by the segment lock.
Fix PR kern/45982 by deemphasizing the estimate of how much metadata
will fill the empty space on disk when the disk is nearly empty
(t_renamerace crates a lot of inode blocks on a tiny empty disk).
as zero. Make it advertise one (no_trunc == true).
Names longer than NAME_MAX (255) will never pass namei() btw.
Fixes PR #43670 (msdosfs claims support for filenames longer than {NAME_MAX},
but fails)
Maintain a tree of file handles, create nodes from msdosfs_vptofh() and keep
them until either the file gets unlinked or the file system gets unmounted.
Fixes the msdosfs part of PR #43745 (fhopen of an unlinked file causes problems
on multiple file systems)
fixing the return value of tmpfs_fhtovp() in the not-found case.
When vmlocking2 was merged to head (Jan 2008 !!) the inode numbering was
changed. Before inodes were numbered 2..tm_nodes_max-1 and after the
merge the numbers are derived from the nodes memory address.
Fixes PR #43605 (tmpfs file handles are broken)
would cause it to lock up while waiting for the p2k_ffs_fillfs test case
to complete (in some cases only).
This has been fixed by the upstream revision
3dd2481ec97b2fde76521939b6451d03ce989745 which I have just pulled into
our copy of atf.
Some analysis:
1) p2k_ffs test program opens a socketpair and forks off rump_ffs
2) after mounting the file system, test program decides it
wants to skip the test and exits
3) somehow, the puffs event thread of rump_ffs stays in kqueue
waiting for activity. fstat+gdb suggests it's waiting for the
now-orphaned socketpair (but I didn't fully verify. is there
an easy way to dump the state of a kqueue descriptor?).
4) test program is a zombie
5) atf-run waits forever
Note: this doesn't trigger always.
So, it seems there are at least two bugs: 1) test case doesn't
timeout 2) the kevent call in rump_ffs never returns even though
the sockerpair is orphaned
So, explicitly unmount the file system before skipping the test.
Obviously the above bugs needs to be properly fixed, since other
skipping test cases can unbeknowingly trigger the issue.
I found the test case a little difficult to understand (because of
many indices), so I added a few more comments after I think I
figured out what was going on.