Print this page
Try to remove assumption that zone's root vnode is marked VROOT

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/nfs/export.h
          +++ new/usr/src/uts/common/nfs/export.h
↓ open down ↓ 30 lines elided ↑ open up ↑
  31   31  
  32   32  #ifndef _NFS_EXPORT_H
  33   33  #define _NFS_EXPORT_H
  34   34  
  35   35  #include <nfs/nfs_sec.h>
  36   36  #include <nfs/auth.h>
  37   37  #include <sys/vnode.h>
  38   38  #include <nfs/nfs4.h>
  39   39  #include <sys/kiconv.h>
  40   40  #include <sys/avl.h>
       41 +#include <sys/zone.h>
  41   42  
  42   43  #ifdef _KERNEL
  43   44  #include <sys/pkp_hash.h> /* for PKP_HASH_SIZE */
  44   45  #endif /* _KERNEL */
  45   46  
  46   47  #ifdef  __cplusplus
  47   48  extern "C" {
  48   49  #endif
  49   50  
  50   51  /*
↓ open down ↓ 414 lines elided ↑ open up ↑
 465  466          /* support for generic n-ary trees */
 466  467          struct treenode *tree_parent;
 467  468          struct treenode *tree_child_first;
 468  469          struct treenode *tree_sibling; /* next sibling */
 469  470          /* private, nfs specific part */
 470  471          struct exportinfo  *tree_exi;
 471  472          struct exp_visible *tree_vis;
 472  473  } treenode_t;
 473  474  
 474  475  /*
 475      - * TREE_ROOT checks if the node corresponds to a filesystem root
      476 + * TREE_ROOT checks if the node corresponds to a filesystem root or
      477 + * the zone's root directory.
 476  478   * TREE_EXPORTED checks if the node is explicitly shared
 477  479   */
 478  480  
 479  481  #define TREE_ROOT(t) \
 480      -        ((t)->tree_exi && (t)->tree_exi->exi_vp->v_flag & VROOT)
      482 +        ((t)->tree_exi != NULL && \
      483 +        (((t)->tree_exi->exi_vp->v_flag & VROOT) || \
      484 +        VN_IS_CURZONEROOT((t)->tree_exi->exi_vp)))
 481  485  
 482  486  #define TREE_EXPORTED(t) \
 483  487          ((t)->tree_exi && !PSEUDO((t)->tree_exi))
 484  488  
 485  489  #define EXPTABLESIZE   256
 486  490  
 487  491  struct exp_hash {
 488  492          struct exportinfo       *prev;  /* ptr to the previous exportinfo */
 489  493          struct exportinfo       *next;  /* ptr to the next exportinfo */
 490  494          struct exportinfo       **bckt; /* backpointer to the hash bucket */
↓ open down ↓ 233 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX