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_dispatch.c
          +++ new/usr/src/uts/common/fs/nfs/nfs4_dispatch.c
↓ open down ↓ 47 lines elided ↑ open up ↑
  48   48  uint32_t nfs4_drc_max = 8 * 1024;
  49   49  
  50   50  /*
  51   51   * The number of buckets we'd like to hash the
  52   52   * replies into.. do not change this on the fly.
  53   53   */
  54   54  uint32_t nfs4_drc_hash = 541;
  55   55  
  56   56  static void rfs4_resource_err(struct svc_req *req, COMPOUND4args *argsp);
  57   57  
  58      -extern zone_key_t rfs4_zone_key;
  59      -
  60   58  /*
  61   59   * Initialize a duplicate request cache.
  62   60   */
  63   61  rfs4_drc_t *
  64   62  rfs4_init_drc(uint32_t drc_size, uint32_t drc_hash_size)
  65   63  {
  66   64          rfs4_drc_t *drc;
  67   65          uint32_t   bki;
  68   66  
  69   67          ASSERT(drc_size);
↓ open down ↓ 20 lines elided ↑ open up ↑
  90   88  
  91   89          return (drc);
  92   90  }
  93   91  
  94   92  /*
  95   93   * Destroy a duplicate request cache.
  96   94   */
  97   95  void
  98   96  rfs4_fini_drc(void)
  99   97  {
 100      -        nfs4_srv_t *nsrv4 = zone_getspecific(rfs4_zone_key, curzone);
       98 +        nfs4_srv_t *nsrv4 = nfs4_get_srv();
 101   99          rfs4_drc_t *drc = nsrv4->nfs4_drc;
 102  100          rfs4_dupreq_t *drp, *drp_next;
 103  101  
 104  102          /* iterate over the dr_cache and free the enties */
 105  103          for (drp = list_head(&(drc->dr_cache)); drp != NULL; drp = drp_next) {
 106  104  
 107  105                  if (drp->dr_state == NFS4_DUP_REPLAY)
 108  106                          rfs4_compound_free(&(drp->dr_res));
 109  107  
 110  108                  if (drp->dr_addr.buf != NULL)
↓ open down ↓ 269 lines elided ↑ open up ↑
 380  378  
 381  379          COMPOUND4res     res_buf;
 382  380          COMPOUND4res    *rbp;
 383  381          COMPOUND4args   *cap;
 384  382          cred_t          *cr = NULL;
 385  383          int              error = 0;
 386  384          int              dis_flags = 0;
 387  385          int              dr_stat = NFS4_NOT_DUP;
 388  386          rfs4_dupreq_t   *drp = NULL;
 389  387          int              rv;
 390      -        nfs4_srv_t *nsrv4 = zone_getspecific(rfs4_zone_key, curzone);
      388 +        nfs4_srv_t *nsrv4 = nfs4_get_srv();
 391  389          rfs4_drc_t *nfs4_drc = nsrv4->nfs4_drc;
 392  390  
 393  391          ASSERT(disp);
 394  392  
 395  393          /*
 396  394           * Short circuit the RPC_NULL proc.
 397  395           */
 398  396          if (disp->dis_proc == rpc_null) {
 399  397                  DTRACE_NFSV4_1(null__start, struct svc_req *, req);
 400  398                  if (!svc_sendreply(xprt, xdr_void, NULL)) {
↓ open down ↓ 215 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX