nfs_stats.c (2951:8e5048c1f58e) nfs_stats.c (11291:80bdcd03e626)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 5 unchanged lines hidden (view full) ---

14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21/*
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 5 unchanged lines hidden (view full) ---

14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21/*
22 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
24 */
25
23 * Use is subject to license terms.
24 */
25
26#pragma ident "%Z%%M% %I% %E% SMI"
27
28#include <sys/types.h>
29#include <sys/kstat.h>
30#include <sys/zone.h>
31#include <sys/kmem.h>
32#include <sys/systm.h>
33
34#include <nfs/nfs.h>
35#include <nfs/nfs4_kprot.h>

--- 46 unchanged lines hidden (view full) ---

82 * The "calls" counter is a Contract Private interface covered by
83 * PSARC/2001/357. Please contact contract-2001-357-01@eng.sun.com before
84 * making any changes.
85 */
86
87static const kstat_named_t svstat_tmpl[] = {
88 { "calls", KSTAT_DATA_UINT64 },
89 { "badcalls", KSTAT_DATA_UINT64 },
26#include <sys/types.h>
27#include <sys/kstat.h>
28#include <sys/zone.h>
29#include <sys/kmem.h>
30#include <sys/systm.h>
31
32#include <nfs/nfs.h>
33#include <nfs/nfs4_kprot.h>

--- 46 unchanged lines hidden (view full) ---

80 * The "calls" counter is a Contract Private interface covered by
81 * PSARC/2001/357. Please contact contract-2001-357-01@eng.sun.com before
82 * making any changes.
83 */
84
85static const kstat_named_t svstat_tmpl[] = {
86 { "calls", KSTAT_DATA_UINT64 },
87 { "badcalls", KSTAT_DATA_UINT64 },
88 { "referrals", KSTAT_DATA_UINT64 },
89 { "referlinks", KSTAT_DATA_UINT64 },
90};
91
92/* Points to the global zone server kstat data for all nfs versions */
93kstat_named_t *global_svstat_ptr[NFS_VERSMAX + 1];
94
95static void
96nfsstat_zone_init_server(zoneid_t zoneid, kstat_named_t *svstatp[])
97{

--- 5 unchanged lines hidden (view full) ---

103 */
104 svstatp[0] = NULL;
105 svstatp[1] = NULL;
106 global_svstat_ptr[0] = NULL;
107 global_svstat_ptr[0] = NULL;
108
109 for (vers = NFS_VERSION; vers <= NFS_V4; vers++) {
110 svstatp[vers] = nfsstat_zone_init_common(zoneid, "nfs", vers,
90};
91
92/* Points to the global zone server kstat data for all nfs versions */
93kstat_named_t *global_svstat_ptr[NFS_VERSMAX + 1];
94
95static void
96nfsstat_zone_init_server(zoneid_t zoneid, kstat_named_t *svstatp[])
97{

--- 5 unchanged lines hidden (view full) ---

103 */
104 svstatp[0] = NULL;
105 svstatp[1] = NULL;
106 global_svstat_ptr[0] = NULL;
107 global_svstat_ptr[0] = NULL;
108
109 for (vers = NFS_VERSION; vers <= NFS_V4; vers++) {
110 svstatp[vers] = nfsstat_zone_init_common(zoneid, "nfs", vers,
111 "nfs_server", svstat_tmpl, sizeof (svstat_tmpl));
111 "nfs_server", svstat_tmpl, sizeof (svstat_tmpl));
112 if (zoneid == GLOBAL_ZONEID)
113 global_svstat_ptr[vers] = svstatp[vers];
114 }
115}
116
117static void
118nfsstat_zone_fini_server(zoneid_t zoneid, kstat_named_t **svstatp)
119{

--- 569 unchanged lines hidden ---
112 if (zoneid == GLOBAL_ZONEID)
113 global_svstat_ptr[vers] = svstatp[vers];
114 }
115}
116
117static void
118nfsstat_zone_fini_server(zoneid_t zoneid, kstat_named_t **svstatp)
119{

--- 569 unchanged lines hidden ---