diff options
author | Evan Layton <evan.layton@nexenta.com> | 2018-03-05 20:41:49 -0800 |
---|---|---|
committer | Dan McDonald <danmcd@joyent.com> | 2020-02-07 12:52:15 -0500 |
commit | 0dfe541e13279d277d838d6a27e55188b9486cb1 (patch) | |
tree | 829622e0bbae74d30f6154c7355b9dffa88bb8d0 /usr/src/lib/libdtrace | |
parent | d8ab6e129d75d7c3f21a7909bf811a3de65faea8 (diff) | |
download | illumos-gate-0dfe541e13279d277d838d6a27e55188b9486cb1.tar.gz |
11083 support NFS server in zone
Portions contributed by: Dan Kruchinin <dan.kruchinin@nexenta.com>
Portions contributed by: Stepan Zastupov <stepan.zastupov@gmail.com>
Portions contributed by: Joyce McIntosh <joyce.mcintosh@nexenta.com>
Portions contributed by: Mike Zeller <mike@mikezeller.net>
Portions contributed by: Dan McDonald <danmcd@joyent.com>
Portions contributed by: Gordon Ross <gordon.w.ross@gmail.com>
Portions contributed by: Vitaliy Gusev <gusev.vitaliy@gmail.com>
Reviewed by: Rick McNeal <rick.mcneal@nexenta.com>
Reviewed by: Rob Gittins <rob.gittins@nexenta.com>
Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com>
Reviewed by: Jason King <jbk@joyent.com>
Reviewed by: C Fraire <cfraire@me.com>
Approved by: Garrett D'Amore <garrett@damore.org>
Diffstat (limited to 'usr/src/lib/libdtrace')
-rw-r--r-- | usr/src/lib/libdtrace/common/nfs.d | 15 | ||||
-rw-r--r-- | usr/src/lib/libdtrace/common/smb.d | 6 |
2 files changed, 20 insertions, 1 deletions
diff --git a/usr/src/lib/libdtrace/common/nfs.d b/usr/src/lib/libdtrace/common/nfs.d index d14c706aca..7a97cd5e6d 100644 --- a/usr/src/lib/libdtrace/common/nfs.d +++ b/usr/src/lib/libdtrace/common/nfs.d @@ -23,6 +23,9 @@ * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ +/* + * Copyright 2018 Nexenta Systems, Inc. All rights reserved. + */ #pragma D depends_on library ip.d #pragma D depends_on library net.d @@ -35,6 +38,8 @@ 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) */ + string noi_shrpath; /* current share path */ + zoneid_t noi_zoneid; /* zone identifier */ } nfsv4opinfo_t; typedef struct nfsv4cbinfo { @@ -101,12 +106,17 @@ 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; + noi_shrpath = (P->exi == NULL || P->exi->exi_export.ex_path == NULL) ? + "<unknown>" : P->exi->exi_export.ex_path; + noi_zoneid = (P->exi == NULL) ? -1 : P->exi->exi_zoneid; }; typedef struct nfsv3opinfo { uint64_t noi_xid; /* unique transation ID */ cred_t *noi_cred; /* credentials for operation */ string noi_curpath; /* current file handle path (if any) */ + string noi_shrpath; /* current share path */ + zoneid_t noi_zoneid; /* zone identifier */ } nfsv3opinfo_t; typedef struct nfsv3oparg nfsv3oparg_t; @@ -117,4 +127,9 @@ translator nfsv3opinfo_t < nfsv3oparg_t *P > { noi_cred = (cred_t *)arg1; noi_curpath = (arg2 == 0 || ((vnode_t *)arg2)->v_path == NULL) ? "<unknown>" : ((vnode_t *)arg2)->v_path; + noi_shrpath = + (arg3 == 0 || ((exportinfo_t *)arg3)->exi_export.ex_path == NULL) ? + "<unknown>" : ((exportinfo_t *)arg3)->exi_export.ex_path; + noi_zoneid = + (arg3 == 0) ? -1 : ((exportinfo_t *)arg3)->exi_zoneid; }; diff --git a/usr/src/lib/libdtrace/common/smb.d b/usr/src/lib/libdtrace/common/smb.d index c58cb4bf1c..9b2f8bdc1f 100644 --- a/usr/src/lib/libdtrace/common/smb.d +++ b/usr/src/lib/libdtrace/common/smb.d @@ -23,7 +23,7 @@ * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. * - * Copyright 2017 Nexenta Systems, Inc. All rights reserved. + * Copyright 2018 Nexenta Systems, Inc. All rights reserved. */ #pragma D depends_on library ip.d @@ -58,6 +58,7 @@ typedef struct smbopinfo { uint16_t soi_fid; /* file id */ uint16_t soi_flags2; /* flags2 */ uint8_t soi_flags; /* flags */ + zoneid_t soi_zoneid; /* zone identifier */ } smbopinfo_t; #pragma D binding "1.5" translator @@ -72,6 +73,7 @@ translator smbopinfo_t < struct smb_request *P > { soi_fid = P->smb_fid; soi_flags2 = P->smb_flg2; soi_flags = P->smb_flg; + soi_zoneid = P->sr_server->sv_zid; soi_share = (P->tid_tree == NULL) ? "<NULL>" : P->tid_tree->t_sharename; @@ -137,6 +139,7 @@ typedef struct smb2opinfo { uint32_t soi_tid; /* tree ID */ uint32_t soi_status; uint32_t soi_flags; + zoneid_t soi_zoneid; /* zone identifier */ } smb2opinfo_t; #pragma D binding "1.5" translator @@ -149,6 +152,7 @@ translator smb2opinfo_t < struct smb_request *P > { soi_tid = P->smb_tid; soi_status = P->smb2_status; soi_flags = P->smb2_hdr_flags; + soi_zoneid = P->sr_server->sv_zid; soi_share = (P->tid_tree == NULL) ? "<NULL>" : P->tid_tree->t_sharename; |