ufs_quota.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 1999 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/*
* University Copyright- Copyright (c) 1982, 1986, 1988
* The Regents of the University of California
* All Rights Reserved
*
* University Acknowledgment- Portions of this document are derived from
* software developed by the University of California, Berkeley, and its
* contributors.
*/
#ifndef _SYS_FS_UFS_QUOTA_H
#define _SYS_FS_UFS_QUOTA_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
* Lock order for the quota sub-system:
*
* vfs_dqrwlock > ip.i_contents > dq_cachelock > dquot.dq_lock > dq_freelock
* vfs_dqrwlock > ip.i_contents > dq_cachelock > dq_freelock
* vfs_dqrwlock > ip.i_contents > dquot.dq_lock > dq_freelock
* vfs_dqrwlock > ip.i_contents > dq_freelock
* vfs_dqrwlock > ip.i_contents > dq_cachelock > dquot.dq_lock > qip.i_contents
*/
/*
* The following constants define the default amount of time given a user
* before the soft limits are treated as hard limits (usually resulting
* in an allocation failure). These may be modified by the quotactl
* system call with the Q_SETQLIM or Q_SETQUOTA commands.
*/
/*
* The dqblk structure defines the format of the disk quota file
* (as it appears on disk) - the file is an array of these structures
* indexed by user number. The setquota sys call establishes the inode
* for each quota file (a pointer is retained in the mount structure).
*/
struct dqblk {
};
/*
* The dquot structure records disk usage for a user on a filesystem.
* There is one allocated for each quota that exists on any filesystem
* for the current user. A cache is kept of recently used entries.
* Active inodes have a pointer to the dquot associated with them.
*/
struct dquot {
short dq_flags;
#ifdef _KERNEL
#endif /* _KERNEL */
};
/*
* flags for vfs_qflags in ufsvfs struct
*/
#if defined(_KERNEL)
/*
* dquot chach hash chain headers
*/
struct dqhead {
};
extern int ndquot;
extern int quotas_initialized; /* quota sub-system init flag */
extern void qtinit();
extern void qtinit2();
extern void invalidatedq(struct ufsvfs *);
#endif /* _KERNEL */
/*
* Definitions for the 'quotactl' system call.
*/
#ifdef _SYSCALL32
/* ILP32 compatible structure for LP64 kernel. */
struct quotctl32 {
int op;
};
#endif /* SYSCALL32 */
struct quotctl {
int op;
};
#ifdef __cplusplus
}
#endif
#endif /* _SYS_FS_UFS_QUOTA_H */