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

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.
  23      - * Copyright 2018 Joyent, Inc.
  24      - * Copyright 2019 Nexenta Systems, Inc. All rights reserved.
  25   24   * Copyright 2014 Igor Kozhukhov <ikozhukhov@gmail.com>.
       25 + * Copyright 2019 Nexenta Systems, Inc. All rights reserved.
       26 + * Copyright 2020 Joyent, Inc.
  26   27   */
  27   28  
  28   29  #ifndef _SYS_ZONE_H
  29   30  #define _SYS_ZONE_H
  30   31  
  31   32  #include <sys/types.h>
  32   33  #include <sys/param.h>
  33   34  #include <sys/tsol/label.h>
  34   35  #include <sys/uadmin.h>
  35   36  #include <netinet/in.h>
↓ open down ↓ 596 lines elided ↑ open up ↑
 632  633          int             zone_mounts_in_progress;
 633  634          kcondvar_t      zone_mount_cv;
 634  635          kmutex_t        zone_mount_lock;
 635  636  } zone_t;
 636  637  
 637  638  /*
 638  639   * Special value of zone_psetid to indicate that pools are disabled.
 639  640   */
 640  641  #define ZONE_PS_INVAL   PS_MYID
 641  642  
 642      -
 643  643  extern zone_t zone0;
 644  644  extern zone_t *global_zone;
 645  645  extern uint_t maxzones;
 646  646  extern rctl_hndl_t rc_zone_nlwps;
 647  647  extern rctl_hndl_t rc_zone_nprocs;
 648  648  
 649  649  extern long zone(int, void *, void *, void *, void *);
 650  650  extern void zone_zsd_init(void);
 651  651  extern void zone_init(void);
 652  652  extern void zone_hold(zone_t *);
↓ open down ↓ 121 lines elided ↑ open up ↑
 774  774  #define ZONE_PATH_TRANSLATE(path, zone) \
 775  775          (ASSERT(ZONE_PATH_VISIBLE(path, zone)), \
 776  776          (path) + (zone)->zone_rootpathlen - 2)
 777  777  
 778  778  /*
 779  779   * Special processes visible in all zones.
 780  780   */
 781  781  #define ZONE_SPECIALPID(x)       ((x) == 0 || (x) == 1)
 782  782  
 783  783  /*
      784 + * A root vnode of the current zone.
      785 + *
      786 + * NOTE: It may be necessary (initialization time for file sharing where an
      787 + * NGZ loads a file-sharing kernel module that does zsd initialization) to NOT
      788 + * use this macro. One should ASSERT() that curzone == active ZSD (an
      789 + * ASSERTion that's not always true at ZSD initialization time) during regular
      790 + * use of this macro.
      791 + */
      792 +#define ZONE_ROOTVP()   (curzone->zone_rootvp)
      793 +
      794 +/*
      795 + * Since a zone's root isn't necessarily an actual filesystem boundary
      796 + * (i.e. VROOT may not be set on zone->zone_rootvp) we need to not assume it.
      797 + * This macro helps in checking if a vnode is the current zone's rootvp.
      798 + * NOTE:  Using the VN_ prefix, even though it's defined here in zone.h.
      799 + * NOTE2: See above warning about ZONE_ROOTVP().
      800 + */
      801 +#define VN_IS_CURZONEROOT(vp)   (VN_CMP(vp, ZONE_ROOTVP()))
      802 +
      803 +/*
 784  804   * Zone-safe version of thread_create() to be used when the caller wants to
 785  805   * create a kernel thread to run within the current zone's context.
 786  806   */
 787  807  extern kthread_t *zthread_create(caddr_t, size_t, void (*)(), void *, size_t,
 788  808      pri_t);
 789  809  extern void zthread_exit(void);
 790  810  
 791  811  /*
 792  812   * Functions for an external observer to register interest in a zone's status
 793  813   * change.  Observers will be woken up when the zone status equals the status
↓ open down ↓ 76 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX