~ubuntu-branches/ubuntu/edgy/xfsprogs/edgy

« back to all changes in this revision

Viewing changes to include/xqm.h

  • Committer: Bazaar Package Importer
  • Author(s): Nathan Scott
  • Date: 2005-03-30 10:52:07 UTC
  • Revision ID: james.westby@ubuntu.com-20050330105207-fv1jw5r9d2fgwvew
Tags: 2.6.28-1
* New upstream release.
* Fix compilation with gcc version 4 (closes: #300544)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (c) 1995, 2001 Silicon Graphics, Inc.  All Rights Reserved.
 
2
 * Copyright (c) 1995, 2001, 2004 Silicon Graphics, Inc.  All Rights Reserved.
3
3
 *
4
4
 * This program is free software; you can redistribute it and/or modify it
5
5
 * under the terms of version 2.1 of the GNU Lesser General Public License
33
33
#ifndef __XQM_H__
34
34
#define __XQM_H__
35
35
 
36
 
#include <xfs/libxfs.h>
 
36
#include <xfs/xfs.h>
37
37
 
38
38
/*
39
39
 * Disk quota - quotactl(2) commands for the XFS Quota Manager (XQM).
40
40
 */
41
41
 
42
42
#define XQM_CMD(x)      (('X'<<8)+(x))  /* note: forms first QCMD argument */
43
 
#define Q_XQUOTAON      XQM_CMD(0x1)    /* enable accounting/enforcement */
44
 
#define Q_XQUOTAOFF     XQM_CMD(0x2)    /* disable accounting/enforcement */
45
 
#define Q_XGETQUOTA     XQM_CMD(0x3)    /* get disk limits and usage */
46
 
#define Q_XSETQLIM      XQM_CMD(0x4)    /* set disk limits */
47
 
#define Q_XGETQSTAT     XQM_CMD(0x5)    /* get quota subsystem status */
48
 
#define Q_XQUOTARM      XQM_CMD(0x6)    /* free disk space used by dquots */
 
43
#define Q_XQUOTAON      XQM_CMD(1)      /* enable accounting/enforcement */
 
44
#define Q_XQUOTAOFF     XQM_CMD(2)      /* disable accounting/enforcement */
 
45
#define Q_XGETQUOTA     XQM_CMD(3)      /* get disk limits and usage */
 
46
#define Q_XSETQLIM      XQM_CMD(4)      /* set disk limits */
 
47
#define Q_XGETQSTAT     XQM_CMD(5)      /* get quota subsystem status */
 
48
#define Q_XQUOTARM      XQM_CMD(6)      /* free disk space used by dquots */
49
49
 
50
50
/*
51
51
 * fs_disk_quota structure:
105
105
#define FS_DQ_TIMER_MASK        (FS_DQ_BTIMER | FS_DQ_ITIMER | FS_DQ_RTBTIMER)
106
106
 
107
107
/*
108
 
 * The following constants define the default amount of time given a user
109
 
 * before the soft limits are treated as hard limits (usually resulting
110
 
 * in an allocation failure).  These may be modified by the quotactl(2)
111
 
 * system call with the Q_XSETQLIM command.
 
108
 * Warning counts are set in both super user's dquot and others. For others,
 
109
 * warnings are set/cleared by the administrators (or automatically by going
 
110
 * below the soft limit).  Superusers warning values set the warning limits
 
111
 * for the rest.  In case these values are zero, the DQ_{F,B}WARNLIMIT values
 
112
 * defined below are used. 
 
113
 * These values also apply only to the d_fieldmask field for Q_XSETQLIM.
112
114
 */
113
 
#define DQ_FTIMELIMIT   (7 * 24*60*60)          /* 1 week */
114
 
#define DQ_BTIMELIMIT   (7 * 24*60*60)          /* 1 week */
 
115
#define FS_DQ_BWARNS    (1<<9)
 
116
#define FS_DQ_IWARNS    (1<<10)
 
117
#define FS_DQ_RTBWARNS  (1<<11)
 
118
#define FS_DQ_WARNS_MASK        (FS_DQ_BWARNS | FS_DQ_IWARNS | FS_DQ_RTBWARNS)
115
119
 
116
120
/*
117
121
 * Various flags related to quotactl(2).  Only relevant to XFS filesystems.
120
124
#define XFS_QUOTA_UDQ_ENFD      (1<<1)  /* user quota limits enforcement */
121
125
#define XFS_QUOTA_GDQ_ACCT      (1<<2)  /* group quota accounting */
122
126
#define XFS_QUOTA_GDQ_ENFD      (1<<3)  /* group quota limits enforcement */
 
127
#define XFS_QUOTA_PDQ_ACCT      (1<<4)  /* project quota accounting */
 
128
#define XFS_QUOTA_PDQ_ENFD      (1<<5)  /* project quota limits enforcement */
123
129
 
124
130
#define XFS_USER_QUOTA          (1<<0)  /* user quota type */
125
 
#define XFS_PROJ_QUOTA          (1<<1)  /* (IRIX) project quota type */
 
131
#define XFS_PROJ_QUOTA          (1<<1)  /* project quota type */
126
132
#define XFS_GROUP_QUOTA         (1<<2)  /* group quota type */
127
133
 
128
134
/*