Print this page
Fix NFS design problems re. multiple zone keys
Make NFS server zone-specific data all have the same lifetime
Fix rfs4_clean_state_exi
Fix exi_cache_reclaim
Fix mistakes in zone keys work
More fixes re. exi_zoneid and exi_tree
(danmcd -> Keep some ASSERT()s around for readability.)

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/nfs/nfs4_srv_ns.c
          +++ new/usr/src/uts/common/fs/nfs/nfs4_srv_ns.c
↓ open down ↓ 161 lines elided ↑ open up ↑
 162  162          exi->exi_fsid = fsid;
 163  163          exi->exi_fid = *fid;
 164  164          exi->exi_vp = vp;
 165  165          VN_HOLD(exi->exi_vp);
 166  166          exi->exi_visible = vis_head;
 167  167          exi->exi_count = 1;
 168  168          /* Caller will set exi_zone... */
 169  169          exi->exi_volatile_dev = (vfssw[vp->v_vfsp->vfs_fstype].vsw_flag &
 170  170              VSW_VOLATILEDEV) ? 1 : 0;
 171  171          mutex_init(&exi->exi_lock, NULL, MUTEX_DEFAULT, NULL);
      172 +        exi->exi_zoneid = ne->ne_globals->nfs_zoneid;
 172  173  
 173  174          /*
 174  175           * Build up the template fhandle
 175  176           */
 176  177          exi->exi_fh.fh_fsid = fsid;
 177  178          ASSERT(exi->exi_fid.fid_len <= sizeof (exi->exi_fh.fh_xdata));
 178  179          exi->exi_fh.fh_xlen = exi->exi_fid.fid_len;
 179  180          bcopy(exi->exi_fid.fid_data, exi->exi_fh.fh_xdata,
 180  181              exi->exi_fid.fid_len);
 181  182          exi->exi_fh.fh_len = sizeof (exi->exi_fh.fh_data);
↓ open down ↓ 651 lines elided ↑ open up ↑
 833  834   */
 834  835  void
 835  836  treeclimb_unexport(nfs_export_t *ne, struct exportinfo *exip)
 836  837  {
 837  838          treenode_t *tnode, *old_nd;
 838  839          treenode_t *connect_point = NULL;
 839  840  
 840  841          ASSERT(RW_WRITE_HELD(&ne->exported_lock));
 841  842          ASSERT(curzone == exip->exi_zone || curzone == global_zone);
 842  843  
      844 +        /*
      845 +         * exi_tree can be null for the zone root
      846 +         * which means we're already at the "top"
      847 +         * and there's nothing more to "climb".
      848 +         */
 843  849          tnode = exip->exi_tree;
      850 +        if (tnode == NULL) {
      851 +                /* Should only happen for... */
      852 +                ASSERT(exip == ne->exi_root);
      853 +                return;
      854 +        }
      855 +
 844  856          /*
 845  857           * The unshared exportinfo was unlinked in unexport().
 846  858           * Zeroing tree_exi ensures that we will skip it.
 847  859           */
 848  860          tnode->tree_exi = NULL;
 849  861  
 850  862          if (tnode->tree_vis != NULL) /* system root has tree_vis == NULL */
 851  863                  tnode->tree_vis->vis_exported = 0;
 852  864  
 853  865          while (tnode != NULL) {
↓ open down ↓ 421 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX