summaryrefslogtreecommitdiffstats
path: root/sys/kern/vnode_if.src
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2008-12-12 00:57:38 +0000
committermarcus <marcus@FreeBSD.org>2008-12-12 00:57:38 +0000
commit91e684d7f9814a84afd87b2fc49ddcf6b6099b3c (patch)
treeff54050fd05bb494abfb240c2cb4731c086eb403 /sys/kern/vnode_if.src
parent509ce401ea8d49b634f2041c35c407a0d4e7d980 (diff)
downloadFreeBSD-src-91e684d7f9814a84afd87b2fc49ddcf6b6099b3c.zip
FreeBSD-src-91e684d7f9814a84afd87b2fc49ddcf6b6099b3c.tar.gz
Add a new VOP, VOP_VPTOCNP, which translates a vnode to its component name
on a best-effort basis. Teach vn_fullpath to use this new VOP if a regular VFS cache lookup fails. This VOP is designed to supplement the VFS cache to provide a better chance that a vnode-to-name lookup will succeed. Currently, an implementation for devfs is being committed. The default implementation is to return ENOENT. A big thanks to kib for the mentorship on this, and to pho for running it through his stress test suite. Reviewed by: arch Approved by: kib
Diffstat (limited to 'sys/kern/vnode_if.src')
-rw-r--r--sys/kern/vnode_if.src10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/kern/vnode_if.src b/sys/kern/vnode_if.src
index 3733156..36ea434 100644
--- a/sys/kern/vnode_if.src
+++ b/sys/kern/vnode_if.src
@@ -595,3 +595,13 @@ vop_vptofh {
IN struct vnode *vp;
IN struct fid *fhp;
};
+
+%% vptocnp vp L L L
+%% vptocnp vpp - U -
+
+vop_vptocnp {
+ IN struct vnode *vp;
+ OUT struct vnode **vpp;
+ INOUT char *buf;
+ INOUT int *buflen;
+};
OpenPOWER on IntegriCloud