git: b8b33f3b3b71 - main - vfs: retire NAMEI_DIAGNOSTIC
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 09 Aug 2023 10:38:04 UTC
The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=b8b33f3b3b71ad7b4b5714afec21d6e8ad7fd6ce commit b8b33f3b3b71ad7b4b5714afec21d6e8ad7fd6ce Author: Mateusz Guzik <mjg@FreeBSD.org> AuthorDate: 2023-08-09 10:37:13 +0000 Commit: Mateusz Guzik <mjg@FreeBSD.org> CommitDate: 2023-08-09 10:37:13 +0000 vfs: retire NAMEI_DIAGNOSTIC It is too spammy and information-deficient for practical use. Also see https://reviews.freebsd.org/D41207 --- sys/kern/vfs_lookup.c | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index 1f62cf3e6652..9ed7990fb8fb 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -71,9 +71,6 @@ __FBSDID("$FreeBSD$"); #include <vm/uma.h> -#define NAMEI_DIAGNOSTIC 1 -#undef NAMEI_DIAGNOSTIC - #ifdef INVARIANTS static void NDVALIDATE_impl(struct nameidata *, int); #define NDVALIDATE(ndp) NDVALIDATE_impl(ndp, __LINE__) @@ -1106,12 +1103,6 @@ dirloop: error = ENAMETOOLONG; goto bad; } -#ifdef NAMEI_DIAGNOSTIC - { char c = *cp; - *cp = '\0'; - printf("{%s}: ", cnp->cn_nameptr); - *cp = c; } -#endif prev_ni_pathlen = ndp->ni_pathlen; ndp->ni_pathlen -= cnp->cn_namelen; KASSERT(ndp->ni_pathlen <= PATH_MAX, @@ -1258,18 +1249,12 @@ unionlookup: */ if (needs_exclusive_leaf(dp->v_mount, cnp->cn_flags)) cnp->cn_lkflags = LK_EXCLUSIVE; -#ifdef NAMEI_DIAGNOSTIC - vn_printf(dp, "lookup in "); -#endif lkflags_save = cnp->cn_lkflags; cnp->cn_lkflags = enforce_lkflags(dp->v_mount, cnp->cn_lkflags); error = VOP_LOOKUP(dp, &ndp->ni_vp, cnp); cnp->cn_lkflags = lkflags_save; if (error != 0) { KASSERT(ndp->ni_vp == NULL, ("leaf should be empty")); -#ifdef NAMEI_DIAGNOSTIC - printf("not found\n"); -#endif if ((error == ENOENT) && (dp->v_vflag & VV_ROOT) && (dp->v_mount != NULL) && (dp->v_mount->mnt_flag & MNT_UNION)) { @@ -1321,9 +1306,6 @@ unionlookup: } good: -#ifdef NAMEI_DIAGNOSTIC - printf("found\n"); -#endif dp = ndp->ni_vp; /* @@ -1509,12 +1491,7 @@ vfs_relookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, * Search a new directory. * * See a comment in vfs_lookup for cnp->cn_nameptr. - */ -#ifdef NAMEI_DIAGNOSTIC - printf("{%s}: ", cnp->cn_nameptr); -#endif - - /* + * * Check for "" which represents the root directory after slash * removal. */ @@ -1541,9 +1518,6 @@ vfs_relookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, /* * We now have a segment name to search for, and a directory to search. */ -#ifdef NAMEI_DIAGNOSTIC - vn_printf(dp, "search in "); -#endif if ((error = VOP_LOOKUP(dp, vpp, cnp)) != 0) { KASSERT(*vpp == NULL, ("leaf should be empty")); if (error != EJUSTRETURN)