Date: Mon, 15 Apr 2013 20:16:32 +0000 (UTC) From: "Pedro F. Giffuni" <pfg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249526 - head/cddl/lib/libdtrace Message-ID: <201304152016.r3FKGW5f055190@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pfg Date: Mon Apr 15 20:16:31 2013 New Revision: 249526 URL: http://svnweb.freebsd.org/changeset/base/249526 Log: DTrace: NFS translators should be split into client/server pieces Merge change from illumos: 1731 DTrace NFS translators should be split into client/server pieces Illumos Revision: 13523:6763769941d2 This code seems to be currently unused on FreeBSD. Reference: https://www.illumos.org/issues/1731 Obtained from: Illumos MFC after: 1 week Added: head/cddl/lib/libdtrace/nfssrv.d - copied, changed from r249521, head/cddl/lib/libdtrace/nfs.d Modified: head/cddl/lib/libdtrace/nfs.d Modified: head/cddl/lib/libdtrace/nfs.d ============================================================================== --- head/cddl/lib/libdtrace/nfs.d Mon Apr 15 20:06:56 2013 (r249525) +++ head/cddl/lib/libdtrace/nfs.d Mon Apr 15 20:16:31 2013 (r249526) @@ -32,7 +32,7 @@ #pragma D depends_on library ip.d #pragma D depends_on library net.d -#pragma D depends_on module genunix +#pragma D depends_on module nfs typedef struct nfsv4opinfo { uint64_t noi_xid; /* unique transation ID */ @@ -76,21 +76,3 @@ translator nfsv4opinfo_t < struct compou noi_cred = P->basecr; noi_curpath = (P->vp == NULL) ? "<unknown>" : P->vp->v_path; }; - -#pragma D binding "1.5" translator -translator conninfo_t < rfs4_client_t *P > { - ci_protocol = (P->cl_addr.ss_family == AF_INET) ? "ipv4" : "ipv6"; - - ci_local = "<unknown>"; - - ci_remote = (P->cl_addr.ss_family == AF_INET) ? - inet_ntoa((ipaddr_t *) - &((struct sockaddr_in *)&P->cl_addr)->sin_addr) : - inet_ntoa6(&((struct sockaddr_in6 *)&P->cl_addr)->sin6_addr); -}; - -#pragma D binding "1.5" translator -translator nfsv4cbinfo_t < rfs4_deleg_state_t *P > { - nci_curpath = (P->finfo->vp == NULL) ? "<unknown>" : - P->finfo->vp->v_path; -}; Copied and modified: head/cddl/lib/libdtrace/nfssrv.d (from r249521, head/cddl/lib/libdtrace/nfs.d) ============================================================================== --- head/cddl/lib/libdtrace/nfs.d Mon Apr 15 18:38:21 2013 (r249521, copy source) +++ head/cddl/lib/libdtrace/nfssrv.d Mon Apr 15 20:16:31 2013 (r249526) @@ -32,50 +32,8 @@ #pragma D depends_on library ip.d #pragma D depends_on library net.d -#pragma D depends_on module genunix - -typedef struct nfsv4opinfo { - uint64_t noi_xid; /* unique transation ID */ - cred_t *noi_cred; /* credentials for operation */ - string noi_curpath; /* current file handle path (if any) */ -} nfsv4opinfo_t; - -typedef struct nfsv4cbinfo { - string nci_curpath; /* current file handle path (if any) */ -} nfsv4cbinfo_t; - -#pragma D binding "1.5" translator -translator conninfo_t < struct svc_req *P > { - ci_protocol = P->rq_xprt->xp_master->xp_netid == "tcp" ? "ipv4" : - P->rq_xprt->xp_master->xp_netid == "tcp6" ? "ipv6" : - "<unknown>"; - - ci_local = inet_ntoa6(&((conn_t *)P->rq_xprt->xp_xpc. - xpc_wq->q_next->q_ptr)->connua_v6addr.connua_laddr); - - ci_remote = inet_ntoa6(&((conn_t *)P->rq_xprt->xp_xpc. - xpc_wq->q_next->q_ptr)->connua_v6addr.connua_faddr); -}; - -#pragma D binding "1.5" translator -translator conninfo_t < struct compound_state *P > { - ci_protocol = P->req->rq_xprt->xp_master->xp_netid == "tcp" ? "ipv4" : - P->req->rq_xprt->xp_master->xp_netid == "tcp6" ? "ipv6" : - "<unknown>"; - - ci_local = inet_ntoa6(&((conn_t *)P->req->rq_xprt->xp_xpc. - xpc_wq->q_next->q_ptr)->connua_v6addr.connua_laddr); - - ci_remote = inet_ntoa6(&((conn_t *)P->req->rq_xprt->xp_xpc. - xpc_wq->q_next->q_ptr)->connua_v6addr.connua_faddr); -}; - -#pragma D binding "1.5" translator -translator nfsv4opinfo_t < struct compound_state *P > { - noi_xid = P->req->rq_xprt->xp_xid; - noi_cred = P->basecr; - noi_curpath = (P->vp == NULL) ? "<unknown>" : P->vp->v_path; -}; +#pragma D depends_on module nfs.d +#pragma D depends_on module nfssrv #pragma D binding "1.5" translator translator conninfo_t < rfs4_client_t *P > {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304152016.r3FKGW5f055190>