| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
holding the appropriate lock.
- Add a comment explaining why we bump a driver's kobj class reference
when loading a module.
|
|
|
|
| |
races regarding changing of jail-related sysctls.
|
|
|
|
|
| |
even though calling mi_switch() after a panic is likely a bug anyway as
the recursive panic only serves to make things worse.
|
|
|
|
|
|
|
| |
active. Note that the logic indicates this should not be possible so
generate a warning if this ever happens.
Found by: Coverity Prevent (via sam)
|
|
|
|
|
| |
closes the race where the cdev was reclaimed before it ever made it
back to devfs lookup.
|
|
|
|
|
|
| |
Add unlocked version of dev_ref()
Clean up various stuff in sys/conf.h
|
| |
|
|
|
|
|
|
|
| |
on filesystems which safely support them. It appears that many
network filesystems specifically are not shared lock safe.
Sponsored by: Isilon Systems, Inc.
|
|
|
|
|
|
| |
treated as exclusive lock requests.
Sponsored by: Isilon Systems, Inc.
|
|
|
|
| |
Sponsored by: Isilon Systems, Inc.
|
|
|
|
|
|
|
|
|
| |
since simply unlocking a mutex does not ensure that one of the waiters
will run and acquire it. We're more likely to reacquire the mutex
before anyone else has a chance. It has also bit me three times now, as
it's not safe to drop the interlock before sleeping in many cases.
Sponsored by: Isilon Systems, Inc.
|
|
|
|
|
|
|
|
|
|
| |
vnodes whose names it caches, so we no longer need a `generation
number' to tell us if a referenced vnode is invalid. Replace the use
of the parent's v_id in the hash function with the address of the
parent vnode.
Tested by: Peter Holm
Glanced at by: jeff, phk
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
except for places where people forget to update one of them. We now
collect only one set of stats for both of these routines. Other
changes in this commit include:
- Start acquiring Giant again in vn_fullpath(), since it is required
when crossing a mount point.
- Expand the scope of the cache lock to avoid dropping it and
picking it up again for every pathname component. This also
makes it trivial to avoid races in stats collection.
- Assert that nc_dvp == v_dd for directories instead of returning
an error to userland when this is not true. AFAIK, it should
always be true when v_dd is non-null.
- For vn_fullpath(), handle the first (non-directory) vnode
separately.
Glanced at by: jeff, phk
|
|
|
|
|
|
|
|
| |
to cache_lookup(). This allows us to acquire the vnode interlock before
dropping the cache lock. This protects the vnodes identity until we
have locked it.
Sponsored by: Isilon Systems, Inc.
|
|
|
|
|
|
|
|
| |
Don't remove the now unused element from cdev yet, wait until
we have a better reason to bump the version.
There is now no longer any upper limit on how many device drivers
a FreeBSD kernel can have.
|
|
|
|
|
|
| |
proper lock flags via cn_lkflag.
Sponsored by: Isilon Systems, Inc.
|
|
|
|
|
|
|
|
|
| |
acquire shared locks on intermediate directories.
- For the LASTCN, we may have to LK_UPGRADE the parent directory before
we lookup the last component.
- Acquire VFS_ROOT and dp locks based on the cn_lkflag.
Sponsored by: Isilon Systems, Inc.
|
|
|
|
|
|
|
|
|
|
| |
vhold()s us.
- Avoid an extra mutex acquire and release in the common case of vgonel()
by checking for OWEINACT at the start of the function.
- Fix the case where we set OWEINACT in vput(). LK_EXCLUPGRADE drops our
shared lock if it fails.
Sponsored by: Isilon Systems, Inc.
|
|
|
|
| |
Sponsored by: Isilon Systems, Inc.
|
|
|
|
|
|
| |
Otherwise the stale pointer may be accessed after a vnode is freed.
Sponsored by: Isilon Systems, Inc.
|
|
|
|
|
| |
Don't remove the now unused element from cdev yet, wait until
we have a better reason to bump the version.
|
| |
|
| |
|
|
|
|
|
|
|
| |
- Assert that REMOVE, CREATE, and RENAME callers have WANTPARENT
or LOCKPARENT set. You can't complete any of these operations without
at least a reference to the parent. Many filesystems check for this case
even though it isn't possible in the current system.
|
|
|
|
| |
Sponsored by: Isilon Systems, Inc.
|
|
|
|
| |
Sponsored by: Isilon Systems, Inc.
|
|
|
|
| |
Sponsored by: Isilon Systems, Inc.
|
|
|
|
|
|
|
| |
vrele so that we can decrease the indentation of the real work and
make things slightly more clear.
Sponsored by: Isilon Systems, Inc.
|
|
|
|
| |
Sponsored by: Isilon Systems, Inc.
|
|
|
|
|
|
| |
vfs.
Sponsored by: Isilon Systems, Inc.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
calling VOP_LOOKUP(). Rather than having each filesystem check the
LOCKPARENT flag, we simply check it once here and unlock as required.
The only unusual case is ISDOTDOT, where we require an unlocked vnode
on return. Relocking this vnode with the child locked is allowed since
the child is actually its parent.
- Add a few asserts for some unusual conditions that I do not believe can
happen. These will later go away and turn into implementations for these
conditions.
Sponsored by: Isilon Systems, Inc.
|
|
|
|
| |
Also spotted by: bz
|
|
|
|
| |
Found by: bz
|
|
|
|
| |
appearantly fell out during the tty code cleanup.
|
| |
|
|
|
|
|
|
|
| |
some case in unmount. Disable the KASSERT until these problems can
be diagnosed.
Sponsored by: Isilon Systems, Inc.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
now always allocates a new vnode.
- Define a new function, vnlru_free, which frees vnodes from the free list.
It takes as a parameter the number of vnodes to free, which is
wantfreevnodes - freevnodes when called from vnlru_proc or 1 when
called from getnewvnode(). For now, getnewvnode() still tries to reclaim
a free vnode before creating a new one when we are near the limit.
- Define a function, vdestroy, which handles the actual release of memory
and teardown of locks, etc. This could become a uma_dtor() routine.
- Get rid of minvnodes. Now wantfreevnodes is 1/4th the max vnodes. This
keeps more unreferenced vnodes around so that files which have only
been stat'd are less likely to be kicked out of the system before we
have a chance to read them, etc. These vnodes may still be freed via
the normal vnlru_proc() routines which may some day become a real lru.
|
|
|
|
|
|
|
|
|
| |
actual root file system is mounted, the first entry on the mountlist
is not the root file system and the timestamp for that entry is
typically 0. Passing that to inittodr() caused annoying errors on
alpha and ia64.
So, call inittodr() for all file systems on mountlist, but only when
the timestamp (mnt_time) is non-zero.
|
|
|
|
|
|
| |
- Add a 'show lockedbufs' command that is similar to show lockedvnods.
Sponsored by: Isilon Systems, Inc.
|
|
|
|
|
|
|
| |
on DEBUG as ufs will soon grow a dependency on this count.
Discussed with: bde
Sponsored by: Isilon Systems, Inc.
|
|
|
|
|
|
|
| |
corresponding pointer to the buffer (ret_name and ret_resname) is non-NULL
to avoid possible NULL pointer derefs.
Reported by: Coverity via sam
|
|
|
|
|
|
| |
subr_bus.c doesn't need to peek inside struct resource.
OK from: imp
|
|
|
|
|
|
| |
userret().
Sponsored by: Isilon Systems, Inc.
|
|
|
|
|
|
|
| |
lockmgr locks that this thread owns. This is complicated due to
LK_KERNPROC and because lockmgr tolerates unlocking an unlocked lock.
Sponsored by: Isilon Systes, Inc.
|
|
|
|
|
|
| |
now, all calls to VFS_ROOT() should still acquire exclusive locks.
Sponsored by: Isilon Systems, Inc.
|
|
|
|
| |
Sponsored by: Isilon Systems, Inc.
|
|
|
|
| |
Sponsored by: Isilon Systems, Inc.
|
|
|
|
|
|
|
|
|
|
|
| |
before it can call VOP_INACTIVE(). This must use the EXCLUPGRADE path
because we may violate some lock order with another locked vnode if
we drop and reacquire the lock. If EXCLUPGRADE fails, we mark the
vnode with VI_OWEINACT. This case should be very rare.
- Clear VI_OWEINACT in vinactive() and vbusy().
- If VI_OWEINACT is set in vgone() do the VOP_INACTIVE call here as well.
Sponsored by: Isilon Systems, Inc.
|
|
|
|
|
|
|
| |
- Always pass LOCKSHARED and rely on namei() to ignore it when
LOOKUP_SHARED is not set.
Sponsored by: Isilon Systems, Inc.
|
|
|
|
|
|
|
| |
LOCKSHARED flag is simply ignored in namei() if LOOKUP_SHARED is not
enabled.
Sponsored by: Isilon Systems, Inc.
|