diff options
author | phk <phk@FreeBSD.org> | 2004-12-06 08:31:32 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2004-12-06 08:31:32 +0000 |
commit | 753d615ec01e09d4509ce777a880341ea6feb39d (patch) | |
tree | 93ace8ca23553123c0dfd5066b9419aea9adb71e /sys/nfsclient/nfs_lock.h | |
parent | b62f254b426d1e3871d394d61c4ae1997fca0a70 (diff) | |
download | FreeBSD-src-753d615ec01e09d4509ce777a880341ea6feb39d.zip FreeBSD-src-753d615ec01e09d4509ce777a880341ea6feb39d.tar.gz |
For reasons unknown, the nfs locking code used a fifo to send requests to
userland and a dedicated system call to get replies.
The vnode-bypass of fifos broke this into a panic.
Ditch all the magic and create a device /dev/nfslock instead, and
use that for both directions apart from the shorter path, this is
also faster because the device driver runs Giant free using the
vnode bypass.
Noticed by: marcel
Diffstat (limited to 'sys/nfsclient/nfs_lock.h')
-rw-r--r-- | sys/nfsclient/nfs_lock.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/nfsclient/nfs_lock.h b/sys/nfsclient/nfs_lock.h index e4bb794..b49d12c 100644 --- a/sys/nfsclient/nfs_lock.h +++ b/sys/nfsclient/nfs_lock.h @@ -44,7 +44,7 @@ * and where lockd reads these requests. * */ -#define _PATH_LCKFIFO "/var/run/lock" +#define _PATH_NFSLCKDEV "nfslock" /* * This structure is used to uniquely identify the process which originated @@ -58,12 +58,13 @@ struct lockd_msg_ident { int msg_seq; /* Sequence number of message */ }; -#define LOCKD_MSG_VERSION 2 +#define LOCKD_MSG_VERSION 3 /* * The structure that the kernel hands us for each lock request. */ typedef struct __lock_msg { + TAILQ_ENTRY(__lock_msg) lm_link; /* internal linkage */ int lm_version; /* which version is this */ struct lockd_msg_ident lm_msg_ident; /* originator of the message */ struct flock lm_fl; /* The lock request. */ @@ -88,5 +89,4 @@ struct lockd_ans { #ifdef _KERNEL int nfs_dolock(struct vop_advlock_args *ap); -int nfslockdans(struct thread *td, struct lockd_ans *ansp); #endif |