Age | Commit message (Collapse) | Author |
|
to get shared locks for lookup and get the exclusive lock only with
LK_DRAIN on unmount and do the real exclusive locking with flags in
mnt_flags, we now use shared locks for lookup and an exclusive lock for
unmount.
This is accomplished by slightly changing the semantics of vfs_busy.
Old vfs_busy behavior:
- with LK_NOWAIT set in flags, a shared lock was obtained if the
mountpoint wasn't being unmounted, otherwise we just returned an error.
- with no flags, a shared lock was obtained if the mountpoint was being
unmounted, otherwise we slept until the unmount was done and returned
an error.
LK_NOWAIT was used for sync(2) and some statistics code where it isn't really
critical that we get the correct results.
0 was used in fchdir and lookup where it's critical that we get the right
directory vnode for the filesystem root.
After this change vfs_busy keeps the same behavior for no flags and LK_NOWAIT.
But if some other flags are passed into it, they are passed directly
into lockmgr (actually LK_SLEEPFAIL is always added to those flags because
if we sleep for the lock, that means someone was holding the exclusive lock
and the exclusive lock is only held when the filesystem is being unmounted.
More changes:
dounmount must now be called with the exclusive lock held. (before this
the caller was supposed to hold the vfs_busy lock, but that wasn't always
true).
Zap some (now) unused mount flags.
And the highlight of this change:
Add some vfs_busy calls to match some vfs_unbusy calls, especially in
sys_mount. (lockmgr doesn't detect the case where we release a lock noone
holds (it will do that soon)).
If you've seen hangs on reboot with mfs this should solve it (I repeat this
for the fourth time now, but this time I spent two months fixing and
redesigning this and reading the code so this time I must have gotten
this right).
|
|
|
|
I'm not completly sure it's needed, but better safe than sorry. And this
simplifies some spl assertions in the still not comitted splassert code.
|
|
Synch files that use that field.
(This argument is an internal interface specific to OpenBSD, so it won't
cause compatibility problems.)
(No bump, not an ABI change).
ok art, millert...
|
|
|
|
|
|
fix from NetBSD
pr#1693
art@ OK
|
|
|
|
|
|
machines or some configurations or in some phase of the moon (we actually
don't know when or why) files disappeared. Since we've not been able to
track down the problem in two weeks intense debugging and we need -current
to be stable, back out everything to a state it had before UBC.
We apologise for the inconvenience.
|
|
the filesystem if we're allowed to mmap the file.
|
|
and should probably be spelled MAKEDEV to not trip people.
|
|
|
|
|
|
|
|
|
|
|
|
Require that the mount point is vfs_busy on entry to dounmount.
|
|
|
|
After finding the third deadlock during dounmount, I decided that it would
be less painful to let the unmounting be handled with a separate thread.
XXX - this is a kludge.
|
|
|
|
fstatfs(2), and getfsstat(2) so you will need to build a new kernel
before doing a "make build" or you will get "unimplemented syscall" errors.
The new struct statfs has the following featuires:
o Has a u_int32_t flags field--now softdep can have a real flag.
o Uses u_int32_t instead of longs (nicer on the alpha). Note: the man
page used to lie about setting invalid/unused fields to -1. SunOS does
that but our code never has.
o Gets rid of f_type completely. It hasn't been used since NetBSD 0.9
and having it there but always 0 is confusing. It is conceivable
that this may cause some old code to not compile but that is better
than silently breaking.
o Adds a mount_info union that contains the FSTYPE_args struct. This
means that "mount" can now tell you all the options a filesystem was
mounted with. This is especially nice for NFS.
Other changes:
o The linux statfs emulation didn't convert between BSD fs names
and linux f_type numbers. Now it does, since the BSD f_type
number is useless to linux apps (and has been removed anyway)
o FreeBSD's struct statfs is different from our (both old and new)
and thus needs conversion. Previously, the OpenBSD syscalls
were used without any real translation.
o mount(8) will now show extra info when invoked with no arguments.
However, to see *everything* you need to use the -v (verbose) flag.
|
|
From Chuck Silvers <chs@netbsd>.
|
|
XXX - This is wrong. I have to rethink this/rewrite mfs.
|
|
|
|
|
|
|
|
|
|
to be vop_generic_revoke, vop_generic_bwrite, vop_generic_islocked,
vop_generic_lock and vop_generic_unlock.
Create vop_generic_abortop and propogate change to all file systems.
Fix PR/371.
Get rid of locking in NULLFS (should be mostly unnecessary now except for
forced unmounts).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|