| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
in cddl-specific parts of the source tree.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
user-mode lock manager, build a kernel with the NFSLOCKD option and
add '-k' to 'rpc_lockd_flags' in rc.conf.
Highlights include:
* Thread-safe kernel RPC client - many threads can use the same RPC
client handle safely with replies being de-multiplexed at the socket
upcall (typically driven directly by the NIC interrupt) and handed
off to whichever thread matches the reply. For UDP sockets, many RPC
clients can share the same socket. This allows the use of a single
privileged UDP port number to talk to an arbitrary number of remote
hosts.
* Single-threaded kernel RPC server. Adding support for multi-threaded
server would be relatively straightforward and would follow
approximately the Solaris KPI. A single thread should be sufficient
for the NLM since it should rarely block in normal operation.
* Kernel mode NLM server supporting cancel requests and granted
callbacks. I've tested the NLM server reasonably extensively - it
passes both my own tests and the NFS Connectathon locking tests
running on Solaris, Mac OS X and Ubuntu Linux.
* Userland NLM client supported. While the NLM server doesn't have
support for the local NFS client's locking needs, it does have to
field async replies and granted callbacks from remote NLMs that the
local client has contacted. We relay these replies to the userland
rpc.lockd over a local domain RPC socket.
* Robust deadlock detection for the local lock manager. In particular
it will detect deadlocks caused by a lock request that covers more
than one blocking request. As required by the NLM protocol, all
deadlock detection happens synchronously - a user is guaranteed that
if a lock request isn't rejected immediately, the lock will
eventually be granted. The old system allowed for a 'deferred
deadlock' condition where a blocked lock request could wake up and
find that some other deadlock-causing lock owner had beaten them to
the lock.
* Since both local and remote locks are managed by the same kernel
locking code, local and remote processes can safely use file locks
for mutual exclusion. Local processes have no fairness advantage
compared to remote processes when contending to lock a region that
has just been unlocked - the local lock manager enforces a strict
first-come first-served model for both local and remote lockers.
Sponsored by: Isilon Systems
PR: 95247 107555 115524 116679
MFC after: 2 weeks
|
|
|
|
|
|
|
|
|
| |
after each SYSINIT() macro invocation. This makes a number of
lightweight C parsers much happier with the FreeBSD kernel
source, including cflow's prcc and lxr.
MFC after: 1 month
Discussed with: imp, rink
|
|
|
|
|
|
|
| |
Submitted by: alc
Reported by: kris (originally) and many others
Tested with: fsx
MFC after: 1 week
|
|
|
|
|
|
|
|
|
| |
always curthread.
As KPI gets broken by this patch, manpages and __FreeBSD_version will be
updated by further commits.
Tested by: Andrea Barberio <insomniac at slackware dot it>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
namespace in order to handle lockmgr fields in a controlled way instead
than spreading all around bogus stubs:
- VN_LOCK_AREC() allows lock recursion for a specified vnode
- VN_LOCK_ASHARE() allows lock sharing for a specified vnode
In FFS land:
- BUF_AREC() allows lock recursion for a specified buffer lock
- BUF_NOREC() disallows recursion for a specified buffer lock
Side note: union_subr.c::unionfs_node_update() is the only other function
directly handling lockmgr fields. As this is not simple to fix, it has
been left behind as "sole" exception.
|
|
|
|
|
|
|
| |
'kmem_map too small panics'.
- Print two warnings if there is not enough memory and not enough address
space.
- Improve comment.
|
|
|
|
|
|
|
|
|
|
|
| |
conjuction with 'thread' argument passing which is always curthread.
Remove the unuseful extra-argument and pass explicitly curthread to lower
layer functions, when necessary.
KPI results broken by this change, which should affect several ports, so
version bumping and manpage update will be further committed.
Tested by: kris, pho, Diego Sardina <siarodx at gmail dot com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove this argument and pass curthread directly to underlying
VOP_LOCK1() VFS method. This modify makes the code cleaner and in
particular remove an annoying dependence helping next lockmgr() cleanup.
KPI results, obviously, changed.
Manpage and FreeBSD_version will be updated through further commits.
As a side note, would be valuable to say that next commits will address
a similar cleanup about VFS methods, in particular vop_lock1 and
vop_unlock.
Tested by: Diego Sardina <siarodx at gmail dot com>,
Andrea Di Pasquale <whyx dot it at gmail dot com>
|
|
|
|
|
| |
* Use LBOLT rather than lbolt to avoid a clash with a FreeBSD global
variable.
|
| |
|
|
|
|
|
|
|
| |
pointless, because default is set to something around 300MB and also
insufficient.
MFC after: 3 days
|
|
|
|
| |
MFC after: 3 days
|
|
|
|
|
|
|
| |
This fixes replacing drive in place, eg. zpool replace tank da1 da1.
Before it complained that device is already open.
MFC after: 1 week
|
|
|
|
| |
Approved by: pjd (mentor)
|
|
|
|
|
|
|
|
| |
(BIO_WRITE and BIO_FLUSH) as it is done is Solaris. The difference is
that Solaris calls it only for sync requests, but we can't say in GEOM
is the request is sync or async, so we do it for every request.
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
| |
to kproc_xxx as they actually make whole processes.
Thos makes way for us to add REAL kthread_create() and friends
that actually make theads. it turns out that most of these
calls actually end up being moved back to the thread version
when it's added. but we need to make this cosmetic change first.
I'd LOVE to do this rename in 7.0 so that we can eventually MFC the
new kthread_xxx() calls.
|
|
|
|
| |
Pointed out by: pjd
|
|
|
|
|
|
| |
problems with zfs-on-root since devd isnt running yet.
Reviewed by: pjd
|
|
|
|
|
|
|
| |
panic.
Reported by: kris
Approved by: re (kensmith)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
value, so we don't run out of KVA. The default vnodes limit fits better for
UFS, but ZFS allocated more file system specific memory for a vnode than UFS.
Don't touch vnodes limit if we detect it was tuned by system administrator
and restore original value when ZFS is unloaded.
This isn't final fix, but before we implement something better, this will
help to stabilize ZFS under heavy load on i386.
Approved by: re (bmah)
|
|
|
|
|
| |
Tested by: kris
Approved by: re (bmah)
|
|
|
|
| |
Approved by: re (bmah)
|
|
|
|
|
| |
Reviewed by: dfr
Approved by: re (rwatson)
|
|
|
|
|
|
|
| |
memory usage and pessimal cache performance.
Reviewed by: pjd
Approved by: re (rwatson)
|
|
|
|
|
|
|
| |
vnode, make sure we return an error code to the caller.
Reviewed by: pjd
Approved by: re
|
|
|
|
|
|
|
| |
implementing some of them using existing ones.
- Allow to compile ZFS on all archs and use atomic operations surrounded
by global mutex on archs we don't have or can't have all atomic
operations needed by ZFS.
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. Pass locking flags to VFS_ROOT().
2. Check v_mountedhere while the vnode is locked.
3. Always return locked vnode on success.
Change 1 fixes problem reported by Stephen M. Rumble - after
zfs_vfsops.c,1.9 change, zfs_root() no longer locks the vnode
unconditionally and traverse() didn't pass right lock type to
VFS_ROOT(). The result was that kernel paniced when .zfs/ directory
was accessed via NFS.
|
|
|
|
|
|
|
|
| |
based on individual fields beeing set. This doesn't work for setattr replay,
because va_type is set there, so we add AT_TYPE flag to va_mask, which won't
be accepted by zfs_setattr().
Reported by: kris
|
|
|
|
| |
use just in case.
|
|
|
|
|
|
|
|
| |
initialization is complete. This fixes some root-on-ZFS
configurations.
Reported by: Bruno Damour <freebsd.ruomad@free.fr>
Tested by: Bruno Damour <freebsd.ruomad@free.fr>
|
| |
|
|
|
|
|
| |
properly, but add XXX comment saying that it can eventually change in
the future.
|
|
|
|
| |
Reported by: des
|
| |
|
|
|
|
|
|
| |
With this change it is possible to unload zfs.ko module from
WITNESS-enabled kernel.
- Remove bogus comment.
|
|
|
|
|
|
|
| |
and show up with different names: first try to open provider using
remembered name and compare its ident, if equal, this is our provider,
if not equal or there is no provider with such name, find provider with
remembered ident and don't care about the name.
|
| |
|
| |
|
|
|
|
|
| |
type. Before this change, if directory was shared-locked, it was relocked
exclusively.
|
|
|
|
| |
shared-locked.
|
|
|
|
|
| |
support shared vnodes locking, we need to remove that flag.
Also add LK_CANRECURSE flag as found in nfsclient.
|
|
|
|
|
| |
Obtained from: OpenSolaris
Bug: http://bugs.opensolaris.org/view_bug.do?bug_id=6465105
|
|
|
|
|
|
|
| |
Pointed out by: ups
Also reported by: kris
- Add comments where I'm not sure if LK_RETRY should be used.
|
|
|
|
|
|
| |
dead vnodes here.
Suggested by: kib
|
| |
|
|
|
|
|
|
|
| |
uiomove() fails, especially that it is different from what OpenSolaris
does (I'm not entirely sure they are right).
Suggested by: darrenr
|
|
|
|
| |
- Add a TODO comment where d_type is still noe defined.
|
| |
|
| |
|