6 * (the "License"). You may not use this file except in compliance
7 * with the License.
8 *
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
13 *
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
21 */
22 /*
23 * Copyright 1999 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 */
26
27 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
28 /* All Rights Reserved */
29
30 /*
31 * University Copyright- Copyright (c) 1982, 1986, 1988
32 * The Regents of the University of California
33 * All Rights Reserved
34 *
35 * University Acknowledgment- Portions of this document are derived from
36 * software developed by the University of California, Berkeley, and its
37 * contributors.
38 */
39
40 #ifndef _SYS_FS_UFS_QUOTA_H
41 #define _SYS_FS_UFS_QUOTA_H
42
43 #ifdef __cplusplus
44 extern "C" {
45 #endif
123 */
124 #define MQ_ENABLED 0x01 /* quotas are enabled */
125
126 #if defined(_KERNEL)
127
128 /*
129 * dquot chach hash chain headers
130 */
131 #define NDQHASH 64 /* smallish power of two */
132 #define DQHASH(uid, mp) \
133 (((uintptr_t)(mp) + (unsigned)(uid)) & (NDQHASH-1))
134
135 struct dqhead {
136 struct dquot *dqh_forw; /* MUST be first */
137 struct dquot *dqh_back; /* MUST be second */
138 };
139
140 extern struct dqhead dqhead[NDQHASH];
141
142 extern struct dquot *dquot, *dquotNDQUOT;
143 extern int ndquot;
144 extern krwlock_t dq_rwlock; /* quota sub-system init lock */
145 extern int quotas_initialized; /* quota sub-system init flag */
146
147 extern void qtinit();
148 extern void qtinit2();
149 extern struct dquot *getinoquota(struct inode *);
150 extern int chkdq(struct inode *ip, long, int, struct cred *, char **errp,
151 size_t *lenp);
152 extern int chkiq(struct ufsvfs *, int, struct inode *, uid_t, int,
153 struct cred *, char **errp, size_t *lenp);
154 extern void dqrele(struct dquot *);
155 extern int closedq(struct ufsvfs *, struct cred *);
156 extern int qsync(struct ufsvfs *);
157
158 extern int getdiskquota(uid_t, struct ufsvfs *, int, struct dquot **);
159 extern void dqput(struct dquot *);
160 extern void dqupdate(struct dquot *);
161 extern void dqinval(struct dquot *);
162 extern void invalidatedq(struct ufsvfs *);
163
|
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
8 *
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
13 *
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
21 */
22 /*
23 * Copyright 1999 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 */
26 /*
27 * Copyright 2013 Nexenta Systems, Inc. All rights reserved.
28 */
29
30 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
31 /* All Rights Reserved */
32
33 /*
34 * University Copyright- Copyright (c) 1982, 1986, 1988
35 * The Regents of the University of California
36 * All Rights Reserved
37 *
38 * University Acknowledgment- Portions of this document are derived from
39 * software developed by the University of California, Berkeley, and its
40 * contributors.
41 */
42
43 #ifndef _SYS_FS_UFS_QUOTA_H
44 #define _SYS_FS_UFS_QUOTA_H
45
46 #ifdef __cplusplus
47 extern "C" {
48 #endif
126 */
127 #define MQ_ENABLED 0x01 /* quotas are enabled */
128
129 #if defined(_KERNEL)
130
131 /*
132 * dquot chach hash chain headers
133 */
134 #define NDQHASH 64 /* smallish power of two */
135 #define DQHASH(uid, mp) \
136 (((uintptr_t)(mp) + (unsigned)(uid)) & (NDQHASH-1))
137
138 struct dqhead {
139 struct dquot *dqh_forw; /* MUST be first */
140 struct dquot *dqh_back; /* MUST be second */
141 };
142
143 extern struct dqhead dqhead[NDQHASH];
144
145 extern struct dquot *dquot, *dquotNDQUOT;
146 extern volatile int ndquot;
147 extern krwlock_t dq_rwlock; /* quota sub-system init lock */
148 extern int quotas_initialized; /* quota sub-system init flag */
149
150 extern void qtinit();
151 extern void qtinit2();
152 extern struct dquot *getinoquota(struct inode *);
153 extern int chkdq(struct inode *ip, long, int, struct cred *, char **errp,
154 size_t *lenp);
155 extern int chkiq(struct ufsvfs *, int, struct inode *, uid_t, int,
156 struct cred *, char **errp, size_t *lenp);
157 extern void dqrele(struct dquot *);
158 extern int closedq(struct ufsvfs *, struct cred *);
159 extern int qsync(struct ufsvfs *);
160
161 extern int getdiskquota(uid_t, struct ufsvfs *, int, struct dquot **);
162 extern void dqput(struct dquot *);
163 extern void dqupdate(struct dquot *);
164 extern void dqinval(struct dquot *);
165 extern void invalidatedq(struct ufsvfs *);
166
|