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,14 +16,18 @@
  * fields enclosed by brackets "[]" replaced with your own identifying
  * information: Portions Copyright [yyyy] [name of copyright owner]
  *
  * CDDL HEADER END
  */
+
 /*
  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ */
+
+/*
  * Copyright 2015 Joyent, Inc. All rights reserved.
- * Copyright 2014 Nexenta Systems, Inc. All rights reserved.
+ * Copyright 2018 Nexenta Systems, Inc.
  * Copyright 2014 Igor Kozhukhov <ikozhukhov@gmail.com>.
  */
 
 #ifndef _SYS_ZONE_H
 #define _SYS_ZONE_H
@@ -635,11 +639,10 @@
 /*
  * Special value of zone_psetid to indicate that pools are disabled.
  */
 #define ZONE_PS_INVAL   PS_MYID
 
-
 extern zone_t zone0;
 extern zone_t *global_zone;
 extern uint_t maxzones;
 extern rctl_hndl_t rc_zone_nlwps;
 extern rctl_hndl_t rc_zone_nprocs;
@@ -777,10 +780,15 @@
  * Special processes visible in all zones.
  */
 #define ZONE_SPECIALPID(x)       ((x) == 0 || (x) == 1)
 
 /*
+ * A root vnode of the current zone.
+ */
+#define ZONE_ROOTVP()   (curproc->p_zone->zone_rootvp)
+
+/*
  * Zone-safe version of thread_create() to be used when the caller wants to
  * create a kernel thread to run within the current zone's context.
  */
 extern kthread_t *zthread_create(caddr_t, size_t, void (*)(), void *, size_t,
     pri_t);