Print this page
NEX-6778 NFS kstats leak and cause system to hang
Revert "NEX-4261 Per-client NFS server IOPS, bandwidth, and latency kstats"
This reverts commit 586c3ab1927647487f01c337ddc011c642575a52.
Revert "NEX-5354 Aggregated IOPS, bandwidth, and latency kstats for NFS server"
This reverts commit c91d7614da8618ef48018102b077f60ecbbac8c2.
Revert "NEX-5667 nfssrv_stats_flags does not work for aggregated kstats"
This reverts commit 3dcf42618be7dd5f408c327f429c81e07ca08e74.
Revert "NEX-5750 Time values for aggregated NFS server kstats should be normalized"
This reverts commit 1f4d4f901153b0191027969fa4a8064f9d3b9ee1.
Revert "NEX-5942 Panic in rfs4_minorvers_mismatch() with NFSv4.1 client"
This reverts commit 40766417094a162f5e4cc8786c0fa0a7e5871cd9.
Revert "NEX-5752 NFS server: namespace collision in kstats"
This reverts commit ae81e668db86050da8e483264acb0cce0444a132.
Reviewed by: Rob Gittins <rob.gittins@nexenta.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
NEX-4261 Per-client NFS server IOPS, bandwidth, and latency kstats
Reviewed by: Kevin Crowe <kevin.crowe@nexenta.com>
Reviewed by: Roman Strashkin <roman.strashkin@nexenta.com>
NEX-3097 IOPS, bandwidth, and latency kstats for NFS server
Reviewed by: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>
NEX-1128 NFS server: Generic uid and gid remapping for AUTH_SYS
Reviewed by: Jan Kryl <jan.kryl@nexenta.com>
| Split |
Close |
| Expand all |
| Collapse all |
--- old/usr/src/uts/common/nfs/nfs_acl.h
+++ new/usr/src/uts/common/nfs/nfs_acl.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
|
↓ open down ↓ |
10 lines elided |
↑ open up ↑ |
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 +
21 22 /*
23 + * Copyright 2016 Nexenta Systems, Inc. All rights reserved.
24 + */
25 +
26 +/*
22 27 * Copyright 2006 Sun Microsystems, Inc.
23 28 * All rights reserved.
24 29 * Use is subject to license terms.
25 30 */
26 -/*
27 - * Copyright 2014 Nexenta Systems, Inc. All rights reserved.
28 - */
29 31
30 32 #ifndef _NFS_NFS_ACL_H
31 33 #define _NFS_NFS_ACL_H
32 34
33 35 #ifdef __cplusplus
34 36 extern "C" {
35 37 #endif
36 38
37 39 #define NFS_ACL_MAX_ENTRIES 1024
38 40
39 41 typedef ushort_t o_mode;
40 42
41 43 struct aclent {
42 44 int type;
43 45 uid32_t id;
44 46 o_mode perm;
45 47 };
46 48 typedef struct aclent aclent;
47 49
48 50 #define NA_USER_OBJ 0x1
49 51 #define NA_USER 0x2
50 52 #define NA_GROUP_OBJ 0x4
51 53 #define NA_GROUP 0x8
52 54 #define NA_CLASS_OBJ 0x10
53 55 #define NA_OTHER_OBJ 0x20
54 56 #define NA_ACL_DEFAULT 0x1000
55 57
56 58 #define NA_READ 0x4
57 59 #define NA_WRITE 0x2
58 60 #define NA_EXEC 0x1
59 61
60 62 struct secattr {
61 63 uint32 mask;
62 64 int aclcnt;
63 65 struct {
64 66 uint_t aclent_len;
65 67 aclent *aclent_val;
66 68 } aclent;
67 69 int dfaclcnt;
68 70 struct {
69 71 uint_t dfaclent_len;
70 72 aclent *dfaclent_val;
71 73 } dfaclent;
72 74 };
73 75 typedef struct secattr secattr;
74 76
75 77 #define NA_ACL 0x1
76 78 #define NA_ACLCNT 0x2
77 79 #define NA_DFACL 0x4
78 80 #define NA_DFACLCNT 0x8
79 81
80 82 struct GETACL2args {
81 83 fhandle_t fh;
82 84 uint32 mask;
83 85 };
84 86 typedef struct GETACL2args GETACL2args;
85 87
86 88 struct GETACL2resok {
87 89 struct nfsfattr attr;
88 90 vsecattr_t acl;
89 91 };
90 92 typedef struct GETACL2resok GETACL2resok;
91 93
92 94 struct GETACL2res {
93 95 enum nfsstat status;
94 96 union {
95 97 GETACL2resok ok;
96 98 } res_u;
97 99 };
98 100 typedef struct GETACL2res GETACL2res;
99 101
100 102 struct SETACL2args {
101 103 fhandle_t fh;
102 104 vsecattr_t acl;
103 105 };
104 106 typedef struct SETACL2args SETACL2args;
105 107
106 108 struct SETACL2resok {
107 109 struct nfsfattr attr;
108 110 };
109 111 typedef struct SETACL2resok SETACL2resok;
110 112
111 113 struct SETACL2res {
112 114 enum nfsstat status;
113 115 union {
114 116 SETACL2resok ok;
115 117 } res_u;
116 118 };
117 119 typedef struct SETACL2res SETACL2res;
118 120
119 121 struct GETATTR2args {
120 122 fhandle_t fh;
121 123 };
122 124 typedef struct GETATTR2args GETATTR2args;
123 125
124 126 struct GETATTR2resok {
125 127 struct nfsfattr attr;
126 128 };
127 129 typedef struct GETATTR2resok GETATTR2resok;
128 130
129 131 struct GETATTR2res {
130 132 enum nfsstat status;
131 133 union {
132 134 GETATTR2resok ok;
133 135 } res_u;
134 136 };
135 137 typedef struct GETATTR2res GETATTR2res;
136 138
137 139 struct ACCESS2args {
138 140 fhandle_t fh;
139 141 uint32 access;
140 142 };
141 143 typedef struct ACCESS2args ACCESS2args;
142 144
143 145 #define ACCESS2_READ 0x1
144 146 #define ACCESS2_LOOKUP 0x2
145 147 #define ACCESS2_MODIFY 0x4
146 148 #define ACCESS2_EXTEND 0x8
147 149 #define ACCESS2_DELETE 0x10
148 150 #define ACCESS2_EXECUTE 0x20
149 151
150 152 struct ACCESS2resok {
151 153 struct nfsfattr attr;
152 154 uint32 access;
153 155 };
154 156 typedef struct ACCESS2resok ACCESS2resok;
155 157
156 158 struct ACCESS2res {
157 159 enum nfsstat status;
158 160 union {
159 161 ACCESS2resok ok;
160 162 } res_u;
161 163 };
162 164 typedef struct ACCESS2res ACCESS2res;
163 165
164 166 struct GETXATTRDIR2args {
165 167 fhandle_t fh;
166 168 bool_t create;
167 169 };
168 170 typedef struct GETXATTRDIR2args GETXATTRDIR2args;
169 171
170 172 struct GETXATTRDIR2resok {
171 173 fhandle_t fh;
172 174 struct nfsfattr attr;
173 175 };
174 176 typedef struct GETXATTRDIR2resok GETXATTRDIR2resok;
175 177
176 178 struct GETXATTRDIR2res {
177 179 enum nfsstat status;
178 180 union {
179 181 GETXATTRDIR2resok ok;
180 182 } res_u;
181 183 };
182 184 typedef struct GETXATTRDIR2res GETXATTRDIR2res;
183 185
184 186 struct GETACL3args {
185 187 nfs_fh3 fh;
186 188 uint32 mask;
187 189 };
188 190 typedef struct GETACL3args GETACL3args;
189 191
190 192 struct GETACL3resok {
191 193 post_op_attr attr;
192 194 vsecattr_t acl;
193 195 };
194 196 typedef struct GETACL3resok GETACL3resok;
195 197
196 198 struct GETACL3resfail {
197 199 post_op_attr attr;
198 200 };
199 201 typedef struct GETACL3resfail GETACL3resfail;
200 202
201 203 struct GETACL3res {
202 204 nfsstat3 status;
203 205 union {
204 206 GETACL3resok ok;
205 207 GETACL3resfail fail;
206 208 } res_u;
207 209 };
208 210 typedef struct GETACL3res GETACL3res;
209 211
210 212 struct SETACL3args {
211 213 nfs_fh3 fh;
212 214 vsecattr_t acl;
213 215 };
214 216 typedef struct SETACL3args SETACL3args;
215 217
216 218 struct SETACL3resok {
217 219 post_op_attr attr;
218 220 };
219 221 typedef struct SETACL3resok SETACL3resok;
220 222
221 223 struct SETACL3resfail {
222 224 post_op_attr attr;
223 225 };
224 226 typedef struct SETACL3resfail SETACL3resfail;
225 227
226 228 struct SETACL3res {
227 229 nfsstat3 status;
228 230 union {
229 231 SETACL3resok ok;
230 232 SETACL3resfail fail;
231 233 } res_u;
232 234 };
233 235 typedef struct SETACL3res SETACL3res;
234 236
235 237 struct GETXATTRDIR3args {
236 238 nfs_fh3 fh;
237 239 bool_t create;
238 240 };
239 241 typedef struct GETXATTRDIR3args GETXATTRDIR3args;
240 242
241 243 struct GETXATTRDIR3resok {
242 244 nfs_fh3 fh;
243 245 post_op_attr attr;
244 246 };
245 247 typedef struct GETXATTRDIR3resok GETXATTRDIR3resok;
246 248
247 249 struct GETXATTRDIR3res {
248 250 nfsstat3 status;
249 251 union {
250 252 GETXATTRDIR3resok ok;
251 253 } res_u;
252 254 };
253 255 typedef struct GETXATTRDIR3res GETXATTRDIR3res;
254 256
255 257 #define NFS_ACL_PROGRAM ((rpcprog_t)(100227))
256 258 #define NFS_ACL_VERSMIN ((rpcvers_t)(2))
257 259 #define NFS_ACL_VERSMAX ((rpcvers_t)(3))
258 260
259 261 #define NFS_ACL_V2 ((rpcvers_t)(2))
260 262 #define ACLPROC2_NULL ((rpcproc_t)(0))
261 263 #define ACLPROC2_GETACL ((rpcproc_t)(1))
262 264 #define ACLPROC2_SETACL ((rpcproc_t)(2))
263 265 #define ACLPROC2_GETATTR ((rpcproc_t)(3))
264 266 #define ACLPROC2_ACCESS ((rpcproc_t)(4))
265 267 #define ACLPROC2_GETXATTRDIR ((rpcproc_t)(5))
266 268
267 269 #define NFS_ACL_V3 ((rpcvers_t)(3))
268 270 #define ACLPROC3_NULL ((rpcproc_t)(0))
269 271 #define ACLPROC3_GETACL ((rpcproc_t)(1))
270 272 #define ACLPROC3_SETACL ((rpcproc_t)(2))
271 273 #define ACLPROC3_GETXATTRDIR ((rpcproc_t)(3))
272 274
273 275 #ifdef _KERNEL
274 276 /* the xdr functions */
275 277 extern bool_t xdr_uid(XDR *, uid32_t *);
276 278 extern bool_t xdr_o_mode(XDR *, o_mode *);
277 279 extern bool_t xdr_aclent(XDR *, aclent_t *);
278 280 extern bool_t xdr_secattr(XDR *, vsecattr_t *);
279 281
280 282 extern bool_t xdr_GETACL2args(XDR *, GETACL2args *);
281 283 extern bool_t xdr_fastGETACL2args(XDR *, GETACL2args **);
282 284 extern bool_t xdr_GETACL2resok(XDR *, GETACL2resok *);
283 285 extern bool_t xdr_GETACL2res(XDR *, GETACL2res *);
284 286 extern bool_t xdr_SETACL2args(XDR *, SETACL2args *);
285 287 extern bool_t xdr_SETACL2resok(XDR *, SETACL2resok *);
286 288 #ifdef _LITTLE_ENDIAN
287 289 extern bool_t xdr_fastSETACL2resok(XDR *, SETACL2resok *);
288 290 #endif
289 291 extern bool_t xdr_SETACL2res(XDR *, SETACL2res *);
290 292 #ifdef _LITTLE_ENDIAN
291 293 extern bool_t xdr_fastSETACL2res(XDR *, SETACL2res *);
292 294 #endif
293 295 extern bool_t xdr_GETATTR2args(XDR *, GETATTR2args *);
294 296 extern bool_t xdr_fastGETATTR2args(XDR *, GETATTR2args **);
295 297 extern bool_t xdr_GETATTR2resok(XDR *, GETATTR2resok *);
296 298 #ifdef _LITTLE_ENDIAN
297 299 extern bool_t xdr_fastGETATTR2resok(XDR *, GETATTR2resok *);
298 300 #endif
299 301 extern bool_t xdr_GETATTR2res(XDR *, GETATTR2res *);
300 302 #ifdef _LITTLE_ENDIAN
301 303 extern bool_t xdr_fastGETATTR2res(XDR *, GETATTR2res *);
302 304 #endif
303 305 extern bool_t xdr_ACCESS2args(XDR *, ACCESS2args *);
304 306 extern bool_t xdr_fastACCESS2args(XDR *, ACCESS2args **);
305 307 extern bool_t xdr_ACCESS2resok(XDR *, ACCESS2resok *);
306 308 #ifdef _LITTLE_ENDIAN
307 309 extern bool_t xdr_fastACCESS2resok(XDR *, ACCESS2resok *);
308 310 #endif
309 311 extern bool_t xdr_ACCESS2res(XDR *, ACCESS2res *);
310 312 #ifdef _LITTLE_ENDIAN
311 313 extern bool_t xdr_fastACCESS2res(XDR *, ACCESS2res *);
312 314 #endif
313 315 extern bool_t xdr_GETXATTRDIR2args(XDR *, GETXATTRDIR2args *);
314 316 extern bool_t xdr_GETXATTRDIR2res(XDR *, GETXATTRDIR2res *);
315 317
316 318 extern bool_t xdr_GETACL3args(XDR *, GETACL3args *);
317 319 extern bool_t xdr_GETACL3resok(XDR *, GETACL3resok *);
318 320 extern bool_t xdr_GETACL3resfail(XDR *, GETACL3resfail *);
319 321 extern bool_t xdr_GETACL3res(XDR *, GETACL3res *);
320 322 extern bool_t xdr_SETACL3args(XDR *, SETACL3args *);
321 323 extern bool_t xdr_SETACL3resok(XDR *, SETACL3resok *);
322 324 extern bool_t xdr_SETACL3resfail(XDR *, SETACL3resfail *);
323 325 extern bool_t xdr_SETACL3res(XDR *, SETACL3res *);
324 326 extern bool_t xdr_GETXATTRDIR3args(XDR *, GETXATTRDIR3args *);
325 327 extern bool_t xdr_GETXATTRDIR3res(XDR *, GETXATTRDIR3res *);
326 328
327 329 #endif
328 330
329 331 #ifdef _KERNEL
330 332 /* the service procedures */
331 333 extern void acl2_getacl(GETACL2args *, GETACL2res *,
332 334 struct exportinfo *, struct svc_req *, cred_t *, bool_t);
333 335 extern void *acl2_getacl_getfh(GETACL2args *);
334 336 extern void acl2_getacl_free(GETACL2res *);
335 337 extern void acl2_setacl(SETACL2args *, SETACL2res *,
336 338 struct exportinfo *, struct svc_req *, cred_t *, bool_t);
337 339 extern void *acl2_setacl_getfh(SETACL2args *);
338 340 extern void acl2_getattr(GETATTR2args *, GETATTR2res *,
339 341 struct exportinfo *, struct svc_req *, cred_t *, bool_t);
340 342 extern void *acl2_getattr_getfh(GETATTR2args *);
341 343 extern void acl2_access(ACCESS2args *, ACCESS2res *,
342 344 struct exportinfo *, struct svc_req *, cred_t *, bool_t);
343 345 extern void *acl2_access_getfh(ACCESS2args *);
344 346 extern void acl2_getxattrdir(GETXATTRDIR2args *, GETXATTRDIR2res *,
345 347 struct exportinfo *, struct svc_req *, cred_t *, bool_t);
346 348 extern void *acl2_getxattrdir_getfh(GETXATTRDIR2args *);
347 349
348 350 extern void acl3_getacl(GETACL3args *, GETACL3res *,
349 351 struct exportinfo *, struct svc_req *, cred_t *, bool_t);
350 352 extern void *acl3_getacl_getfh(GETACL3args *);
351 353 extern void acl3_getacl_free(GETACL3res *);
352 354 extern void acl3_setacl(SETACL3args *, SETACL3res *,
353 355 struct exportinfo *, struct svc_req *, cred_t *, bool_t);
354 356 extern void *acl3_setacl_getfh(SETACL3args *);
355 357 extern void acl3_getxattrdir(GETXATTRDIR3args *, GETXATTRDIR3res *,
356 358 struct exportinfo *, struct svc_req *, cred_t *, bool_t);
357 359 extern void *acl3_getxattrdir_getfh(GETXATTRDIR3args *);
358 360
359 361 #endif
360 362
361 363 #ifdef _KERNEL
362 364 /* the client side procedures */
363 365 extern int acl_getacl2(vnode_t *, vsecattr_t *, int, cred_t *);
364 366 extern int acl_setacl2(vnode_t *, vsecattr_t *, int, cred_t *);
365 367 extern int acl_getattr2_otw(vnode_t *, vattr_t *, cred_t *);
366 368 extern int acl_access2(vnode_t *, int, int, cred_t *);
367 369 extern int acl_getxattrdir2(vnode_t *, vnode_t **, bool_t, cred_t *, int);
368 370 extern int acl_getacl3(vnode_t *, vsecattr_t *, int, cred_t *);
369 371 extern int acl_setacl3(vnode_t *, vsecattr_t *, int, cred_t *);
370 372 extern int acl_getxattrdir3(vnode_t *, vnode_t **, bool_t, cred_t *, int);
371 373 extern int acl2call(mntinfo_t *, rpcproc_t, xdrproc_t, caddr_t, xdrproc_t,
372 374 caddr_t, cred_t *, int *, enum nfsstat *, int,
|
↓ open down ↓ |
334 lines elided |
↑ open up ↑ |
373 375 failinfo_t *);
374 376 extern int acl3call(mntinfo_t *, rpcproc_t, xdrproc_t, caddr_t, xdrproc_t,
375 377 caddr_t, cred_t *, int *, nfsstat3 *, int,
376 378 failinfo_t *);
377 379 extern void nfs_acl_free(vsecattr_t *);
378 380 #endif
379 381
380 382 #ifdef _KERNEL
381 383 /* server and client data structures */
382 384 extern kstat_named_t *aclproccnt_v2_ptr;
385 +extern kstat_t **aclprocio_v2_ptr;
383 386 extern kstat_named_t *aclproccnt_v3_ptr;
387 +extern kstat_t **aclprocio_v3_ptr;
384 388
385 389 extern char *aclnames_v2[];
386 390 extern uchar_t acl_call_type_v2[];
387 391 extern uchar_t acl_ss_call_type_v2[];
388 392 extern uchar_t acl_timer_type_v2[];
389 393
390 394 extern char *aclnames_v3[];
391 395 extern uchar_t acl_call_type_v3[];
392 396 extern uchar_t acl_ss_call_type_v3[];
393 397 extern uchar_t acl_timer_type_v3[];
394 398 #endif
395 399
396 400 #ifdef __cplusplus
397 401 }
398 402 #endif
399 403
400 404 #endif /* _NFS_NFS_ACL_H */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX