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.
This commit is contained in:
parent
45757984f8
commit
4511dd9d41
@ -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_seg bufseg, size_t buflen,
|
||||
struct vnode *cdir, *rdir;
|
||||
int error;
|
||||
|
||||
if (__predict_false(disablecwd))
|
||||
return (ENODEV);
|
||||
if (__predict_false(buflen < 2))
|
||||
return (EINVAL);
|
||||
if (buflen > path_max)
|
||||
@ -2225,14 +2216,6 @@ kern___getcwd(struct thread *td, char *buf, enum uio_seg bufseg, size_t buflen,
|
||||
return (error);
|
||||
}
|
||||
|
||||
/*
|
||||
* 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 **retbuf, char **freebuf)
|
||||
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.
|
||||
*/
|
||||
@ -2532,10 +2508,6 @@ vn_path_to_global_path(struct thread *td, struct vnode *vp, char *path,
|
||||
|
||||
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);
|
||||
error = vn_fullpath_global(td, vp, &rpath, &fbuf);
|
||||
|
Loading…
Reference in New Issue
Block a user