Date: Sat, 1 Feb 2020 20:36:36 +0000 (UTC) From: Mateusz Guzik <mjg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357384 - head/sys/kern Message-ID: <202002012036.011KaajV051873@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mjg Date: Sat Feb 1 20:36:35 2020 New Revision: 357384 URL: https://svnweb.freebsd.org/changeset/base/357384 Log: cache: remove vnode -> path lookup disablement It seems to be of little to no use even when debugging. Interested parties can resurrect it and gate compilation with a macro. Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Sat Feb 1 20:34:43 2020 (r357383) +++ head/sys/kern/vfs_cache.c Sat Feb 1 20:36:35 2020 (r357384) @@ -2167,13 +2167,6 @@ vfs_cache_lookup(struct vop_lookup_args *ap) return (error); } -/* - * XXX All of these sysctls would probably be more productive dead. - */ -static int __read_mostly disablecwd; -SYSCTL_INT(_debug, OID_AUTO, disablecwd, CTLFLAG_RW, &disablecwd, 0, - "Disable the getcwd syscall"); - /* Implementation of the getcwd syscall. */ int sys___getcwd(struct thread *td, struct __getcwd_args *uap) @@ -2192,8 +2185,6 @@ kern___getcwd(struct thread *td, char *buf, enum uio_s struct vnode *cdir, *rdir; int error; - if (__predict_false(disablecwd)) - return (ENODEV); if (__predict_false(buflen < 2)) return (EINVAL); if (buflen > path_max) @@ -2226,14 +2217,6 @@ kern___getcwd(struct thread *td, char *buf, enum uio_s } /* - * Thus begins the fullpath magic. - */ - -static int __read_mostly disablefullpath; -SYSCTL_INT(_debug, OID_AUTO, disablefullpath, CTLFLAG_RW, &disablefullpath, 0, - "Disable the vn_fullpath function"); - -/* * Retrieve the full filesystem path that correspond to a vnode from the name * cache (if available) */ @@ -2245,8 +2228,6 @@ vn_fullpath(struct thread *td, struct vnode *vn, char struct vnode *rdir; int error; - if (__predict_false(disablefullpath)) - return (ENODEV); if (__predict_false(vn == NULL)) return (EINVAL); @@ -2279,8 +2260,6 @@ vn_fullpath_global(struct thread *td, struct vnode *vn char *buf; int error; - if (__predict_false(disablefullpath)) - return (ENODEV); if (__predict_false(vn == NULL)) return (EINVAL); buf = malloc(MAXPATHLEN, M_TEMP, M_WAITOK); @@ -2515,9 +2494,6 @@ vn_commname(struct vnode *vp, char *buf, u_int buflen) * Requires a locked, referenced vnode. * Vnode is re-locked on success or ENODEV, otherwise unlocked. * - * If sysctl debug.disablefullpath is set, ENODEV is returned, - * vnode is left locked and path remain untouched. - * * If vp is a directory, the call to vn_fullpath_global() always succeeds * because it falls back to the ".." lookup if the namecache lookup fails. */ @@ -2531,10 +2507,6 @@ vn_path_to_global_path(struct thread *td, struct vnode int error; ASSERT_VOP_ELOCKED(vp, __func__); - - /* Return ENODEV if sysctl debug.disablefullpath==1 */ - if (__predict_false(disablefullpath)) - return (ENODEV); /* Construct global filesystem path from vp. */ VOP_UNLOCK(vp);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202002012036.011KaajV051873>