Print this page
11083 support NFS server in zone
Portions contributed by: Dan Kruchinin <dan.kruchinin@nexenta.com>
Portions contributed by: Stepan Zastupov <stepan.zastupov@gmail.com>
Portions contributed by: Joyce McIntosh <joyce.mcintosh@nexenta.com>
Portions contributed by: Mike Zeller <mike@mikezeller.net>
Portions contributed by: Dan McDonald <danmcd@joyent.com>
Portions contributed by: Gordon Ross <gordon.w.ross@gmail.com>
Portions contributed by: Vitaliy Gusev <gusev.vitaliy@gmail.com>
Reviewed by: Rick McNeal <rick.mcneal@nexenta.com>
Reviewed by: Rob Gittins <rob.gittins@nexenta.com>
Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com>
Reviewed by: Jason King <jbk@joyent.com>
Reviewed by: C Fraire <cfraire@me.com>
Change-Id: I22f289d357503f9b48a0bc2482cc4328a6d43d16
| Split |
Close |
| Expand all |
| Collapse all |
--- old/usr/src/uts/common/nfs/nfs4_drc.h
+++ new/usr/src/uts/common/nfs/nfs4_drc.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 /*
22 23 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
23 24 * Use is subject to license terms.
24 25 */
25 26
27 +/*
28 + * Copyright 2018 Nexenta Systems, Inc.
29 + */
30 +
26 31 #ifndef _NFS4_DRC_H
27 32 #define _NFS4_DRC_H
28 33
29 -#pragma ident "%Z%%M% %I% %E% SMI"
30 -
31 34 #ifdef __cplusplus
32 35 extern "C" {
33 36 #endif
34 37
35 38 /*
36 39 * NFSv4 Duplicate Request cache.
37 40 */
38 41 typedef struct rfs4_drc {
39 - kmutex_t lock;
42 + kmutex_t lock;
40 43 uint32_t dr_hash;
41 - uint32_t max_size;
42 - uint32_t in_use;
44 + uint32_t max_size;
45 + uint32_t in_use;
43 46 list_t dr_cache;
44 - list_t *dr_buckets;
47 + list_t *dr_buckets;
45 48 } rfs4_drc_t;
46 49
47 50 /*
48 51 * NFSv4 Duplicate request cache entry.
49 52 */
50 53 typedef struct rfs4_dupreq {
51 - list_node_t dr_bkt_next;
54 + list_node_t dr_bkt_next;
52 55 list_node_t dr_next;
53 56 list_t *dr_bkt;
54 57 rfs4_drc_t *drc;
55 58 int dr_state;
56 59 uint32_t dr_xid;
57 60 struct netbuf dr_addr;
58 - COMPOUND4res dr_res;
61 + COMPOUND4res dr_res;
59 62 } rfs4_dupreq_t;
60 63
61 64 /*
62 65 * State of rfs4_dupreq.
63 66 */
64 67 #define NFS4_DUP_ERROR -1
65 68 #define NFS4_NOT_DUP 0
66 69 #define NFS4_DUP_NEW 1
67 70 #define NFS4_DUP_PENDING 2
68 71 #define NFS4_DUP_FREE 3
69 72
70 -#define NFS4_DUP_REPLAY 4
73 +#define NFS4_DUP_REPLAY 4
71 74 #define NFS4_DUP_INUSE 5
72 75
73 -extern rfs4_drc_t *nfs4_drc;
74 76 extern uint32_t nfs4_drc_max;
75 77 extern uint32_t nfs4_drc_hash;
76 78
77 79 rfs4_drc_t *rfs4_init_drc(uint32_t, uint32_t);
78 -void rfs4_fini_drc(rfs4_drc_t *);
80 +void rfs4_fini_drc(void);
79 81 void rfs4_dr_chstate(rfs4_dupreq_t *, int);
80 82 rfs4_dupreq_t *rfs4_alloc_dr(rfs4_drc_t *);
81 83 int rfs4_find_dr(struct svc_req *, rfs4_drc_t *, rfs4_dupreq_t **);
82 84
83 85 #ifdef __cplusplus
84 86 }
85 87 #endif
86 88
87 89 #endif /* _NFS4_DRC_H */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX