aboutsummaryrefslogtreecommitdiff
path: root/sys/tools
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2018-10-23 21:43:41 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2018-10-23 21:43:41 +0000
commit8ff7fad1d70ef7c6c43e1dd688ba1747c81077dd (patch)
treee24dfb24d4701daf71931772d10ea92583b77dcb /sys/tools
parentec888383cff48d90ac65cdbcad1e3f8e152ff8ca (diff)
downloadsrc-8ff7fad1d70ef7c6c43e1dd688ba1747c81077dd.tar.gz
src-8ff7fad1d70ef7c6c43e1dd688ba1747c81077dd.zip
Only call sigdeferstop() for NFS.
Use bypass to catch any NFS VOP dispatch and route it through the wrapper which does sigdeferstop() and then dispatches original VOP. NFS does not need a bypass below it, which is not supported. The vop offset in the vop_vector is added since otherwise it is impossible to get vop_op_t from the internal table, and I did not wanted to create the layered fs only to wrap NFS VOPs. VFS_OP()s wrap is straightforward. Requested and reviewed by: mjg (previous version) Tested by: pho Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D17658
Notes
Notes: svn path=/head/; revision=339672
Diffstat (limited to 'sys/tools')
-rw-r--r--sys/tools/vnode_if.awk5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/tools/vnode_if.awk b/sys/tools/vnode_if.awk
index 966d0a951e98..6f1d19270786 100644
--- a/sys/tools/vnode_if.awk
+++ b/sys/tools/vnode_if.awk
@@ -181,6 +181,7 @@ if (cfile) {
"struct vnodeop_desc vop_default_desc = {\n" \
" \"default\",\n" \
" 0,\n" \
+ " 0,\n" \
" (vop_bypass_t *)vop_panic,\n" \
" NULL,\n" \
" VDESC_NO_OFFSET,\n" \
@@ -366,12 +367,10 @@ while ((getline < srcfile) > 0) {
add_debug_code(name, args[i], "Entry", "\t");
printc("\tKTR_START" ctrstr);
add_pre(name);
- printc("\tVFS_PROLOGUE(a->a_" args[0]"->v_mount);")
printc("\tif (vop->"name" != NULL)")
printc("\t\trc = vop->"name"(a);")
printc("\telse")
printc("\t\trc = vop->vop_bypass(&a->a_gen);")
- printc("\tVFS_EPILOGUE(a->a_" args[0]"->v_mount);")
printc("\tSDT_PROBE3(vfs, vop, " name ", return, a->a_" args[0] ", a, rc);\n");
printc("\tif (rc == 0) {");
for (i = 0; i < numargs; ++i)
@@ -402,6 +401,8 @@ while ((getline < srcfile) > 0) {
releflags = "0";
printc("\t" releflags vppwillrele ",");
+ # index in struct vop_vector
+ printc("\t__offsetof(struct vop_vector, " name "),");
# function to call
printc("\t(vop_bypass_t *)" uname "_AP,");
# vp offsets