Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
quota.h File Reference
#include <linux/list.h>
#include <linux/mutex.h>
#include <linux/rwsem.h>
#include <linux/spinlock.h>
#include <linux/wait.h>
#include <linux/percpu_counter.h>
#include <linux/dqblk_xfs.h>
#include <linux/dqblk_v1.h>
#include <linux/dqblk_v2.h>
#include <linux/atomic.h>
#include <linux/uidgid.h>
#include <linux/projid.h>
#include <uapi/linux/quota.h>

Go to the source code of this file.

Data Structures

struct  kqid
 
struct  mem_dqblk
 
struct  mem_dqinfo
 
struct  dqstats
 
struct  dquot
 
struct  quota_format_ops
 
struct  dquot_operations
 
struct  quotactl_ops
 
struct  quota_format_type
 
struct  quota_info
 
struct  quota_module_name
 

Macros

#define DQUOT_INIT_ALLOC   max(V1_INIT_ALLOC, V2_INIT_ALLOC)
 
#define DQUOT_INIT_REWRITE   max(V1_INIT_REWRITE, V2_INIT_REWRITE)
 
#define DQUOT_DEL_ALLOC   max(V1_DEL_ALLOC, V2_DEL_ALLOC)
 
#define DQUOT_DEL_REWRITE   max(V1_DEL_REWRITE, V2_DEL_REWRITE)
 
#define DQF_MASK   0xffff /* Mask for format specific flags */
 
#define DQF_GETINFO_MASK   0x1ffff /* Mask for flags passed to userspace */
 
#define DQF_SETINFO_MASK   0xffff /* Mask for flags modifiable from userspace */
 
#define DQF_SYS_FILE_B   16
 
#define DQF_SYS_FILE   (1 << DQF_SYS_FILE_B) /* Quota file stored as system file */
 
#define DQF_INFO_DIRTY_B   31
 
#define DQF_INFO_DIRTY   (1 << DQF_INFO_DIRTY_B) /* Is info dirty? */
 
#define DQ_MOD_B   0 /* dquot modified since read */
 
#define DQ_BLKS_B   1 /* uid/gid has been warned about blk limit */
 
#define DQ_INODES_B   2 /* uid/gid has been warned about inode limit */
 
#define DQ_FAKE_B   3 /* no limits only usage */
 
#define DQ_READ_B   4 /* dquot was read into memory */
 
#define DQ_ACTIVE_B   5 /* dquot is active (dquot_release not called) */
 
#define DQ_LASTSET_B
 
#define DQUOT_USAGE_ENABLED   (1 << _DQUOT_USAGE_ENABLED)
 
#define DQUOT_LIMITS_ENABLED   (1 << _DQUOT_LIMITS_ENABLED)
 
#define DQUOT_SUSPENDED   (1 << _DQUOT_SUSPENDED)
 
#define DQUOT_STATE_FLAGS
 
#define DQUOT_STATE_LAST   (_DQUOT_STATE_FLAGS * MAXQUOTAS)
 
#define DQUOT_QUOTA_SYS_FILE   (1 << DQUOT_STATE_LAST)
 
#define DQUOT_NEGATIVE_USAGE   (1 << (DQUOT_STATE_LAST + 1))
 
#define INIT_QUOTA_MODULE_NAMES
 

Typedefs

typedef __kernel_uid32_t qid_t
 
typedef long long qsize_t
 

Enumerations

enum  quota_type { USRQUOTA = 0, GRPQUOTA = 1, PRJQUOTA = 2 }
 
enum  {
  DQST_LOOKUPS, DQST_DROPS, DQST_READS, DQST_WRITES,
  DQST_CACHE_HITS, DQST_ALLOC_DQUOTS, DQST_FREE_DQUOTS, DQST_SYNCS,
  _DQST_DQSTAT_LAST
}
 
enum  { _DQUOT_USAGE_ENABLED = 0, _DQUOT_LIMITS_ENABLED, _DQUOT_SUSPENDED, _DQUOT_STATE_FLAGS }
 

Functions

bool qid_eq (struct kqid left, struct kqid right)
 
bool qid_lt (struct kqid left, struct kqid right)
 
qid_t from_kqid (struct user_namespace *to, struct kqid qid)
 
qid_t from_kqid_munged (struct user_namespace *to, struct kqid qid)
 
bool qid_valid (struct kqid qid)
 
void mark_info_dirty (struct super_block *sb, int type)
 
int register_quota_format (struct quota_format_type *fmt)
 
void unregister_quota_format (struct quota_format_type *fmt)
 

Variables

spinlock_t dq_data_lock
 
struct dqstatsdqstats_pcpu
 
struct dqstats dqstats
 

Macro Definition Documentation

#define DQ_ACTIVE_B   5 /* dquot is active (dquot_release not called) */

Definition at line 270 of file quota.h.

#define DQ_BLKS_B   1 /* uid/gid has been warned about blk limit */

Definition at line 266 of file quota.h.

#define DQ_FAKE_B   3 /* no limits only usage */

Definition at line 268 of file quota.h.

#define DQ_INODES_B   2 /* uid/gid has been warned about inode limit */

Definition at line 267 of file quota.h.

#define DQ_LASTSET_B
Value:
6 /* Following 6 bits (see QIF_) are reserved\
* for the mask of entries set via SETQUOTA\
* quotactl. They are set under dq_data_lock\
* and the quota format handling dquot can\
* clear them when it sees fit. */

Definition at line 271 of file quota.h.

#define DQ_MOD_B   0 /* dquot modified since read */

Definition at line 265 of file quota.h.

#define DQ_READ_B   4 /* dquot was read into memory */

Definition at line 269 of file quota.h.

#define DQF_GETINFO_MASK   0x1ffff /* Mask for flags passed to userspace */

Definition at line 222 of file quota.h.

#define DQF_INFO_DIRTY   (1 << DQF_INFO_DIRTY_B) /* Is info dirty? */

Definition at line 227 of file quota.h.

#define DQF_INFO_DIRTY_B   31

Definition at line 226 of file quota.h.

#define DQF_MASK   0xffff /* Mask for format specific flags */

Definition at line 221 of file quota.h.

#define DQF_SETINFO_MASK   0xffff /* Mask for flags modifiable from userspace */

Definition at line 223 of file quota.h.

#define DQF_SYS_FILE   (1 << DQF_SYS_FILE_B) /* Quota file stored as system file */

Definition at line 225 of file quota.h.

#define DQF_SYS_FILE_B   16

Definition at line 224 of file quota.h.

#define DQUOT_DEL_ALLOC   max(V1_DEL_ALLOC, V2_DEL_ALLOC)

Definition at line 183 of file quota.h.

#define DQUOT_DEL_REWRITE   max(V1_DEL_REWRITE, V2_DEL_REWRITE)

Definition at line 184 of file quota.h.

#define DQUOT_INIT_ALLOC   max(V1_INIT_ALLOC, V2_INIT_ALLOC)

Definition at line 181 of file quota.h.

#define DQUOT_INIT_REWRITE   max(V1_INIT_REWRITE, V2_INIT_REWRITE)

Definition at line 182 of file quota.h.

#define DQUOT_LIMITS_ENABLED   (1 << _DQUOT_LIMITS_ENABLED)

Definition at line 346 of file quota.h.

#define DQUOT_NEGATIVE_USAGE   (1 << (DQUOT_STATE_LAST + 1))

Definition at line 359 of file quota.h.

#define DQUOT_QUOTA_SYS_FILE   (1 << DQUOT_STATE_LAST)

Definition at line 352 of file quota.h.

#define DQUOT_STATE_FLAGS
Value:
DQUOT_SUSPENDED)

Definition at line 348 of file quota.h.

#define DQUOT_STATE_LAST   (_DQUOT_STATE_FLAGS * MAXQUOTAS)

Definition at line 351 of file quota.h.

#define DQUOT_SUSPENDED   (1 << _DQUOT_SUSPENDED)

Definition at line 347 of file quota.h.

#define DQUOT_USAGE_ENABLED   (1 << _DQUOT_USAGE_ENABLED)

Definition at line 345 of file quota.h.

#define INIT_QUOTA_MODULE_NAMES
Value:
{\
{QFMT_VFS_OLD, "quota_v1"},\
{QFMT_VFS_V0, "quota_v2"},\
{0, NULL}}

Definition at line 401 of file quota.h.

Typedef Documentation

Definition at line 59 of file quota.h.

typedef long long qsize_t

Definition at line 60 of file quota.h.

Enumeration Type Documentation

anonymous enum
Enumerator:
DQST_LOOKUPS 
DQST_DROPS 
DQST_READS 
DQST_WRITES 
DQST_CACHE_HITS 
DQST_ALLOC_DQUOTS 
DQST_FREE_DQUOTS 
DQST_SYNCS 
_DQST_DQSTAT_LAST 

Definition at line 235 of file quota.h.

anonymous enum
Enumerator:
_DQUOT_USAGE_ENABLED 
_DQUOT_LIMITS_ENABLED 
_DQUOT_SUSPENDED 
_DQUOT_STATE_FLAGS 

Definition at line 337 of file quota.h.

enum quota_type
Enumerator:
USRQUOTA 
GRPQUOTA 
PRJQUOTA 

Definition at line 53 of file quota.h.

Function Documentation

qid_t from_kqid ( struct user_namespace to,
struct kqid  qid 
)
qid_t from_kqid_munged ( struct user_namespace to,
struct kqid  qid 
)
void mark_info_dirty ( struct super_block sb,
int  type 
)

Definition at line 396 of file dquot.c.

bool qid_eq ( struct kqid  left,
struct kqid  right 
)

qid_eq - Test to see if to kquid values are the same : A qid value : Another quid value

Return true if the two qid values are equal and false otherwise.

Definition at line 12 of file kqid.c.

bool qid_lt ( struct kqid  left,
struct kqid  right 
)

qid_lt - Test to see if one qid value is less than another : The possibly lesser qid value : The possibly greater qid value

Return true if left is less than right and false otherwise.

Definition at line 36 of file kqid.c.

bool qid_valid ( struct kqid  qid)

qid_valid - Report if a valid value is stored in a kqid. : The kernel internal quota identifier to test.

Definition at line 119 of file kqid.c.

int register_quota_format ( struct quota_format_type fmt)

Definition at line 164 of file dquot.c.

void unregister_quota_format ( struct quota_format_type fmt)

Definition at line 174 of file dquot.c.

Variable Documentation

spinlock_t dq_data_lock

Definition at line 249 of file dquot.c.

struct dqstats* dqstats_pcpu