Print this page
nfssrv: nfsstat reports zeroed data in zone

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/nfs/nfs4_srv.c
          +++ new/usr/src/uts/common/fs/nfs/nfs4_srv.c
↓ open down ↓ 3805 lines elided ↑ open up ↑
3806 3806          if (MANDLOCK(vp, va.va_mode)) {
3807 3807                  *cs->statusp = resp->status = NFS4ERR_ACCESS;
3808 3808                  goto out;
3809 3809          }
3810 3810  
3811 3811          data = kmem_alloc(MAXPATHLEN + 1, KM_SLEEP);
3812 3812  
3813 3813          if (is_referral) {
3814 3814                  char *s;
3815 3815                  size_t strsz;
     3816 +                kstat_named_t *stat =
     3817 +                    cs->exi->exi_ne->ne_globals->svstat[NFS_V4];
3816 3818  
3817 3819                  /* Get an artificial symlink based on a referral */
3818 3820                  s = build_symlink(vp, cs->cr, &strsz);
3819      -                global_svstat_ptr[4][NFS_REFERLINKS].value.ui64++;
     3821 +                stat[NFS_REFERLINKS].value.ui64++;
3820 3822                  DTRACE_PROBE2(nfs4serv__func__referral__reflink,
3821 3823                      vnode_t *, vp, char *, s);
3822 3824                  if (s == NULL)
3823 3825                          error = EINVAL;
3824 3826                  else {
3825 3827                          error = 0;
3826 3828                          (void) strlcpy(data, s, MAXPATHLEN + 1);
3827 3829                          kmem_free(s, strsz);
3828 3830                  }
3829 3831  
↓ open down ↓ 2055 lines elided ↑ open up ↑
5885 5887                   * another thread could proceed past here before the former
5886 5888                   * is finished.
5887 5889                   */
5888 5890                  nsrv4->seen_first_compound = 1;
5889 5891          }
5890 5892  
5891 5893          for (i = 0; i < args->array_len && cs.cont; i++) {
5892 5894                  nfs_argop4 *argop;
5893 5895                  nfs_resop4 *resop;
5894 5896                  uint_t op;
     5897 +                kstat_named_t *stat = ne->ne_globals->rfsproccnt[NFS_V4];
5895 5898  
5896 5899                  argop = &args->array[i];
5897 5900                  resop = &resp->array[i];
5898 5901                  resop->resop = argop->argop;
5899 5902                  op = (uint_t)resop->resop;
5900 5903  
5901 5904                  if (op < rfsv4disp_cnt) {
5902 5905                          /*
5903 5906                           * Count the individual ops here; NULL and COMPOUND
5904 5907                           * are counted in common_dispatch()
5905 5908                           */
5906      -                        rfsproccnt_v4_ptr[op].value.ui64++;
     5909 +                        stat[op].value.ui64++;
5907 5910  
5908 5911                          NFS4_DEBUG(rfs4_debug > 1,
5909 5912                              (CE_NOTE, "Executing %s", rfs4_op_string[op]));
5910 5913                          (*rfsv4disptab[op].dis_proc)(argop, resop, req, &cs);
5911 5914                          NFS4_DEBUG(rfs4_debug > 1, (CE_NOTE, "%s returned %d",
5912 5915                              rfs4_op_string[op], *cs.statusp));
5913 5916                          if (*cs.statusp != NFS4_OK)
5914 5917                                  cs.cont = FALSE;
5915 5918                  } else {
5916 5919                          /*
5917 5920                           * This is effectively dead code since XDR code
5918 5921                           * will have already returned BADXDR if op doesn't
5919 5922                           * decode to legal value.  This only done for a
5920 5923                           * day when XDR code doesn't verify v4 opcodes.
5921 5924                           */
5922 5925                          op = OP_ILLEGAL;
5923      -                        rfsproccnt_v4_ptr[OP_ILLEGAL_IDX].value.ui64++;
     5926 +                        stat[OP_ILLEGAL_IDX].value.ui64++;
5924 5927  
5925 5928                          rfs4_op_illegal(argop, resop, req, &cs);
5926 5929                          cs.cont = FALSE;
5927 5930                  }
5928 5931  
5929 5932                  /*
5930 5933                   * If not at last op, and if we are to stop, then
5931 5934                   * compact the results array.
5932 5935                   */
5933 5936                  if ((i + 1) < args->array_len && !cs.cont) {
↓ open down ↓ 4182 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX