Date: Tue, 12 Jan 2021 13:44:11 GMT From: Mateusz Guzik <mjg@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 70ba77706dab - main - vfs: extend vfs:namei:lookup:return probe with nameidata Message-ID: <202101121344.10CDiBrg053726@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=70ba77706dab8145c2ff152c190b8dcd4528f616 commit 70ba77706dab8145c2ff152c190b8dcd4528f616 Author: Mateusz Guzik <mjg@FreeBSD.org> AuthorDate: 2021-01-12 13:09:55 +0000 Commit: Mateusz Guzik <mjg@FreeBSD.org> CommitDate: 2021-01-12 13:35:27 +0000 vfs: extend vfs:namei:lookup:return probe with nameidata --- sys/kern/vfs_cache.c | 3 ++- sys/kern/vfs_lookup.c | 9 +++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 4dad5f388448..7eb9237bf257 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -5436,7 +5436,8 @@ out: if (SDT_PROBES_ENABLED()) { SDT_PROBE3(vfs, fplookup, lookup, done, ndp, fpl.line, fpl.status); if (fpl.status == CACHE_FPL_STATUS_HANDLED) - SDT_PROBE3(vfs, namei, lookup, return, error, ndp->ni_vp, true); + SDT_PROBE4(vfs, namei, lookup, return, error, ndp->ni_vp, true, + ndp); } if (__predict_true(fpl.status == CACHE_FPL_STATUS_HANDLED)) { diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index 3b8ee558e023..b6529623ecbb 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -76,7 +76,8 @@ __FBSDID("$FreeBSD$"); SDT_PROVIDER_DEFINE(vfs); SDT_PROBE_DEFINE4(vfs, namei, lookup, entry, "struct vnode *", "char *", "unsigned long", "bool"); -SDT_PROBE_DEFINE3(vfs, namei, lookup, return, "int", "struct vnode *", "bool"); +SDT_PROBE_DEFINE4(vfs, namei, lookup, return, "int", "struct vnode *", "bool", + "struct nameidata"); /* Allocation zone for namei. */ uma_zone_t namei_zone; @@ -643,6 +644,8 @@ namei(struct nameidata *ndp) * If not a symbolic link, we're done. */ if ((cnp->cn_flags & ISSYMLINK) == 0) { + SDT_PROBE4(vfs, namei, lookup, return, error, + (error == 0 ? ndp->ni_vp : NULL), false, ndp); if ((cnp->cn_flags & (SAVENAME | SAVESTART)) == 0) { namei_cleanup_cnp(cnp); } else @@ -653,8 +656,6 @@ namei(struct nameidata *ndp) error = ENOTCAPABLE; } nameicap_cleanup(ndp, true); - SDT_PROBE3(vfs, namei, lookup, return, error, - (error == 0 ? ndp->ni_vp : NULL), false); pwd_drop(pwd); if (error == 0) NDVALIDATE(ndp); @@ -729,9 +730,9 @@ namei(struct nameidata *ndp) vrele(ndp->ni_dvp); out: MPASS(error != 0); + SDT_PROBE4(vfs, namei, lookup, return, error, NULL, false, ndp); namei_cleanup_cnp(cnp); nameicap_cleanup(ndp, true); - SDT_PROBE3(vfs, namei, lookup, return, error, NULL, false); pwd_drop(pwd); return (error); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202101121344.10CDiBrg053726>