From owner-svn-src-head@freebsd.org Sat Feb 1 20:36:36 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9D94922C147; Sat, 1 Feb 2020 20:36:36 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4895Tw3fBzz43KQ; Sat, 1 Feb 2020 20:36:36 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5E6AB4A92; Sat, 1 Feb 2020 20:36:36 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 011Kaa96051874; Sat, 1 Feb 2020 20:36:36 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 011KaajV051873; Sat, 1 Feb 2020 20:36:36 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202002012036.011KaajV051873@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sat, 1 Feb 2020 20:36:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357384 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 357384 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Feb 2020 20:36:36 -0000 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);