Print this page
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>
Change-Id: I22f289d357503f9b48a0bc2482cc4328a6d43d16
*** 21,30 ****
--- 21,33 ----
/*
* 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
#pragma D depends_on module nfs
*** 33,42 ****
--- 36,47 ----
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 {
string nci_curpath; /* current file handle path (if any) */
} nfsv4cbinfo_t;
*** 99,114 ****
--- 104,124 ----
#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;
+ 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;
#pragma D binding "1.5" translator
*** 115,120 ****
--- 125,135 ----
translator nfsv3opinfo_t < nfsv3oparg_t *P > {
noi_xid = ((struct svc_req *)arg0)->rq_xprt->xp_xid;
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;
};