Print this page
NEX-15279 support NFS server in zone
NEX-15520 online NFS shares cause zoneadm halt to hang in nfs_export_zone_fini
Portions contributed by: Dan Kruchinin dan.kruchinin@nexenta.com
Portions contributed by: Stepan Zastupov stepan.zastupov@gmail.com
Reviewed by: Joyce McIntosh <joyce.mcintosh@nexenta.com>
Reviewed by: Rob Gittins <rob.gittins@nexenta.com>
Reviewed by: Gordon Ross <gordon.ross@nexenta.com>
@@ -16,16 +16,18 @@
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
+
/*
* Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+
/*
- * Copyright 2012 Nexenta Systems, Inc. All rights reserved.
+ * Copyright 2018 Nexenta Systems, Inc.
*/
#include <sys/systm.h>
#include <sys/cmn_err.h>
#include <nfs/nfs.h>
@@ -131,11 +133,11 @@
struct nfs4_svgetit_arg sarg;
struct compound_state cs;
struct statvfs64 sb;
rfs4_init_compound_state(&cs);
- cs.vp = rootvp;
+ cs.vp = ZONE_ROOTVP();
cs.fh.nfs_fh4_val = NULL;
cs.cr = kcred;
/*
* Get all the supported attributes
@@ -1314,11 +1316,11 @@
* for a VROOT object. sarg->vap was setup
* before we got here, so there's no need to do
* another getattr -- just use the one in sarg.
*/
if (VN_CMP(vp, stubvp)) {
- ASSERT(VN_CMP(vp, rootdir));
+ ASSERT(VN_CMP(vp, ZONE_ROOTVP()));
vap = sarg->vap;
} else {
va.va_mask = AT_NODEID;
vap = &va;
error = rfs4_vop_getattr(stubvp, vap, 0, sarg->cs->cr);