summaryrefslogtreecommitdiffstats
path: root/sys/kern/vnode_if.src
diff options
context:
space:
mode:
authortrociny <trociny@FreeBSD.org>2012-02-29 21:38:31 +0000
committertrociny <trociny@FreeBSD.org>2012-02-29 21:38:31 +0000
commit1aad0004eef0a2c8cc3f79dd3a6f03dd46dd047a (patch)
tree68c4dc3240253dab5bf3767c81e64d876b2ec226 /sys/kern/vnode_if.src
parent7f479f0242bfa3392b0ad6d21188de6300c5576f (diff)
downloadFreeBSD-src-1aad0004eef0a2c8cc3f79dd3a6f03dd46dd047a.zip
FreeBSD-src-1aad0004eef0a2c8cc3f79dd3a6f03dd46dd047a.tar.gz
Introduce VOP_UNP_BIND(), VOP_UNP_CONNECT(), and VOP_UNP_DETACH()
operations for setting and accessing vnode's v_socket field. The operations are necessary to implement proper unix socket handling on layered file systems like nullfs(5). This change fixes the long standing issue with nullfs(5) being in that unix sockets did not work between lower and upper layers: if we bound to a socket on the lower layer we could connect only to the lower path; if we bound to the upper layer we could connect only to the upper path. The new behavior is one can connect to both the lower and the upper paths regardless what layer path one binds to. PR: kern/51583, kern/159663 Suggested by: kib Reviewed by: arch MFC after: 2 weeks
Diffstat (limited to 'sys/kern/vnode_if.src')
-rw-r--r--sys/kern/vnode_if.src20
1 files changed, 20 insertions, 0 deletions
diff --git a/sys/kern/vnode_if.src b/sys/kern/vnode_if.src
index 5da4c1c..5e3fa11 100644
--- a/sys/kern/vnode_if.src
+++ b/sys/kern/vnode_if.src
@@ -640,6 +640,26 @@ vop_advise {
IN int advice;
};
+%% unp_bind vp E E E
+
+vop_unp_bind {
+ IN struct vnode *vp;
+ IN struct socket *socket;
+};
+
+%% unp_connect vp L L L
+
+vop_unp_connect {
+ IN struct vnode *vp;
+ OUT struct socket **socket;
+};
+
+%% unp_detach vp = = =
+
+vop_unp_detach {
+ IN struct vnode *vp;
+};
+
# The VOPs below are spares at the end of the table to allow new VOPs to be
# added in stable branches without breaking the KBI. New VOPs in HEAD should
# be added above these spares. When merging a new VOP to a stable branch,
OpenPOWER on IntegriCloud