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>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/sys/zone.h
          +++ new/usr/src/uts/common/sys/zone.h
↓ open down ↓ 10 lines elided ↑ open up ↑
  11   11   * and limitations under the License.
  12   12   *
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
       21 +
  21   22  /*
  22   23   * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
       24 + */
       25 +
       26 +/*
  23   27   * Copyright 2015 Joyent, Inc. All rights reserved.
  24      - * Copyright 2014 Nexenta Systems, Inc. All rights reserved.
       28 + * Copyright 2018 Nexenta Systems, Inc.
  25   29   * Copyright 2014 Igor Kozhukhov <ikozhukhov@gmail.com>.
  26   30   */
  27   31  
  28   32  #ifndef _SYS_ZONE_H
  29   33  #define _SYS_ZONE_H
  30   34  
  31   35  #include <sys/types.h>
  32   36  #include <sys/mutex.h>
  33   37  #include <sys/param.h>
  34   38  #include <sys/rctl.h>
↓ open down ↓ 595 lines elided ↑ open up ↑
 630  634          int             zone_mounts_in_progress;
 631  635          kcondvar_t      zone_mount_cv;
 632  636          kmutex_t        zone_mount_lock;
 633  637  } zone_t;
 634  638  
 635  639  /*
 636  640   * Special value of zone_psetid to indicate that pools are disabled.
 637  641   */
 638  642  #define ZONE_PS_INVAL   PS_MYID
 639  643  
 640      -
 641  644  extern zone_t zone0;
 642  645  extern zone_t *global_zone;
 643  646  extern uint_t maxzones;
 644  647  extern rctl_hndl_t rc_zone_nlwps;
 645  648  extern rctl_hndl_t rc_zone_nprocs;
 646  649  
 647  650  extern long zone(int, void *, void *, void *, void *);
 648  651  extern void zone_zsd_init(void);
 649  652  extern void zone_init(void);
 650  653  extern void zone_hold(zone_t *);
↓ open down ↓ 121 lines elided ↑ open up ↑
 772  775  #define ZONE_PATH_TRANSLATE(path, zone) \
 773  776          (ASSERT(ZONE_PATH_VISIBLE(path, zone)), \
 774  777          (path) + (zone)->zone_rootpathlen - 2)
 775  778  
 776  779  /*
 777  780   * Special processes visible in all zones.
 778  781   */
 779  782  #define ZONE_SPECIALPID(x)       ((x) == 0 || (x) == 1)
 780  783  
 781  784  /*
      785 + * A root vnode of the current zone.
      786 + */
      787 +#define ZONE_ROOTVP()   (curproc->p_zone->zone_rootvp)
      788 +
      789 +/*
 782  790   * Zone-safe version of thread_create() to be used when the caller wants to
 783  791   * create a kernel thread to run within the current zone's context.
 784  792   */
 785  793  extern kthread_t *zthread_create(caddr_t, size_t, void (*)(), void *, size_t,
 786  794      pri_t);
 787  795  extern void zthread_exit(void);
 788  796  
 789  797  /*
 790  798   * Functions for an external observer to register interest in a zone's status
 791  799   * change.  Observers will be woken up when the zone status equals the status
↓ open down ↓ 76 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX