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_attr.c
          +++ new/usr/src/uts/common/fs/nfs/nfs4_srv_attr.c
↓ open down ↓ 1601 lines elided ↑ open up ↑
1602 1602          if (RFS4_MANDATTR_ONLY)
1603 1603                  return (ENOTSUP);
1604 1604  
1605 1605          switch (cmd) {
1606 1606          case NFS4ATTR_SUPPORTED:
1607 1607                  if (sarg->op == NFS4ATTR_SETIT || sarg->op == NFS4ATTR_VERIT)
1608 1608                          error = EINVAL;
1609 1609                  break;  /* this attr is supported */
1610 1610  
1611 1611          case NFS4ATTR_GETIT:
     1612 +        {
     1613 +                kstat_named_t *stat =
     1614 +                    sarg->cs->exi->exi_ne->ne_globals->svstat[NFS_V4];
     1615 +
1612 1616                  fsl = fetch_referral(sarg->cs->vp, sarg->cs->cr);
1613 1617                  if (fsl == NULL)
1614 1618                          (void) memset(&(na->fs_locations), 0,
1615 1619                              sizeof (fs_locations4));
1616 1620                  else {
1617 1621                          na->fs_locations = *fsl;
1618 1622                          kmem_free(fsl, sizeof (fs_locations4));
1619 1623                  }
1620      -                global_svstat_ptr[4][NFS_REFERRALS].value.ui64++;
     1624 +                stat[NFS_REFERRALS].value.ui64++;
1621 1625                  break;
1622      -
     1626 +        }
1623 1627          case NFS4ATTR_FREEIT:
1624 1628                  if (sarg->op == NFS4ATTR_SETIT || sarg->op == NFS4ATTR_VERIT)
1625 1629                          error = EINVAL;
1626 1630                  rfs4_free_fs_locations4(&na->fs_locations);
1627 1631                  break;
1628 1632  
1629 1633          case NFS4ATTR_SETIT:
1630 1634          case NFS4ATTR_VERIT:
1631 1635                  /*
1632 1636                   * read-only attr
↓ open down ↓ 1242 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX