blob: 9f94cb9a7f00454f92ddba3b60a128026dcdbacd [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _UAPI_LINUX_QUOTA_
20#define _UAPI_LINUX_QUOTA_
Ben Cheng655a7c02013-10-16 16:09:24 -070021#include <linux/types.h>
Christopher Ferris05d08e92016-02-04 13:16:38 -080022#define __DQUOT_VERSION__ "dquot_6.6.0"
23#define MAXQUOTAS 3
Ben Cheng655a7c02013-10-16 16:09:24 -070024#define USRQUOTA 0
25#define GRPQUOTA 1
Christopher Ferris05d08e92016-02-04 13:16:38 -080026#define PRJQUOTA 2
27#define INITQFNAMES { "user", "group", "project", "undefined", \
Tao Baod7db5942015-01-28 10:07:51 -080028};
Ben Cheng655a7c02013-10-16 16:09:24 -070029#define SUBCMDMASK 0x00ff
30#define SUBCMDSHIFT 8
Christopher Ferris05d08e92016-02-04 13:16:38 -080031#define QCMD(cmd,type) (((cmd) << SUBCMDSHIFT) | ((type) & SUBCMDMASK))
Ben Cheng655a7c02013-10-16 16:09:24 -070032#define Q_SYNC 0x800001
33#define Q_QUOTAON 0x800002
34#define Q_QUOTAOFF 0x800003
Christopher Ferris05d08e92016-02-04 13:16:38 -080035#define Q_GETFMT 0x800004
Ben Cheng655a7c02013-10-16 16:09:24 -070036#define Q_GETINFO 0x800005
37#define Q_SETINFO 0x800006
38#define Q_GETQUOTA 0x800007
Christopher Ferris05d08e92016-02-04 13:16:38 -080039#define Q_SETQUOTA 0x800008
Christopher Ferris106b3a82016-08-24 12:15:38 -070040#define Q_GETNEXTQUOTA 0x800009
Ben Cheng655a7c02013-10-16 16:09:24 -070041#define QFMT_VFS_OLD 1
42#define QFMT_VFS_V0 2
Christopher Ferris106b3a82016-08-24 12:15:38 -070043#define QFMT_OCFS2 3
Christopher Ferris05d08e92016-02-04 13:16:38 -080044#define QFMT_VFS_V1 4
Christopher Ferris67d1e5e2023-10-31 13:36:37 -070045#define QFMT_SHMEM 5
Ben Cheng655a7c02013-10-16 16:09:24 -070046#define QIF_DQBLKSIZE_BITS 10
47#define QIF_DQBLKSIZE (1 << QIF_DQBLKSIZE_BITS)
Christopher Ferris106b3a82016-08-24 12:15:38 -070048enum {
Christopher Ferris05d08e92016-02-04 13:16:38 -080049 QIF_BLIMITS_B = 0,
Tao Baod7db5942015-01-28 10:07:51 -080050 QIF_SPACE_B,
51 QIF_ILIMITS_B,
Christopher Ferris106b3a82016-08-24 12:15:38 -070052 QIF_INODES_B,
Christopher Ferris05d08e92016-02-04 13:16:38 -080053 QIF_BTIME_B,
Tao Baod7db5942015-01-28 10:07:51 -080054 QIF_ITIME_B,
Ben Cheng655a7c02013-10-16 16:09:24 -070055};
Christopher Ferris106b3a82016-08-24 12:15:38 -070056#define QIF_BLIMITS (1 << QIF_BLIMITS_B)
Christopher Ferris05d08e92016-02-04 13:16:38 -080057#define QIF_SPACE (1 << QIF_SPACE_B)
Ben Cheng655a7c02013-10-16 16:09:24 -070058#define QIF_ILIMITS (1 << QIF_ILIMITS_B)
59#define QIF_INODES (1 << QIF_INODES_B)
Christopher Ferris106b3a82016-08-24 12:15:38 -070060#define QIF_BTIME (1 << QIF_BTIME_B)
Christopher Ferris05d08e92016-02-04 13:16:38 -080061#define QIF_ITIME (1 << QIF_ITIME_B)
Ben Cheng655a7c02013-10-16 16:09:24 -070062#define QIF_LIMITS (QIF_BLIMITS | QIF_ILIMITS)
63#define QIF_USAGE (QIF_SPACE | QIF_INODES)
Christopher Ferris106b3a82016-08-24 12:15:38 -070064#define QIF_TIMES (QIF_BTIME | QIF_ITIME)
Christopher Ferris05d08e92016-02-04 13:16:38 -080065#define QIF_ALL (QIF_LIMITS | QIF_USAGE | QIF_TIMES)
Ben Cheng655a7c02013-10-16 16:09:24 -070066struct if_dqblk {
Tao Baod7db5942015-01-28 10:07:51 -080067 __u64 dqb_bhardlimit;
Christopher Ferris106b3a82016-08-24 12:15:38 -070068 __u64 dqb_bsoftlimit;
69 __u64 dqb_curspace;
70 __u64 dqb_ihardlimit;
71 __u64 dqb_isoftlimit;
Christopher Ferris106b3a82016-08-24 12:15:38 -070072 __u64 dqb_curinodes;
73 __u64 dqb_btime;
74 __u64 dqb_itime;
75 __u32 dqb_valid;
Christopher Ferris106b3a82016-08-24 12:15:38 -070076};
77struct if_nextdqblk {
78 __u64 dqb_bhardlimit;
Tao Baod7db5942015-01-28 10:07:51 -080079 __u64 dqb_bsoftlimit;
Christopher Ferris05d08e92016-02-04 13:16:38 -080080 __u64 dqb_curspace;
Tao Baod7db5942015-01-28 10:07:51 -080081 __u64 dqb_ihardlimit;
82 __u64 dqb_isoftlimit;
83 __u64 dqb_curinodes;
Christopher Ferris05d08e92016-02-04 13:16:38 -080084 __u64 dqb_btime;
Tao Baod7db5942015-01-28 10:07:51 -080085 __u64 dqb_itime;
86 __u32 dqb_valid;
Christopher Ferris106b3a82016-08-24 12:15:38 -070087 __u32 dqb_id;
Christopher Ferris106b3a82016-08-24 12:15:38 -070088};
Christopher Ferris05d08e92016-02-04 13:16:38 -080089#define IIF_BGRACE 1
Ben Cheng655a7c02013-10-16 16:09:24 -070090#define IIF_IGRACE 2
91#define IIF_FLAGS 4
Christopher Ferris106b3a82016-08-24 12:15:38 -070092#define IIF_ALL (IIF_BGRACE | IIF_IGRACE | IIF_FLAGS)
Christopher Ferris05d08e92016-02-04 13:16:38 -080093enum {
94 DQF_ROOT_SQUASH_B = 0,
95 DQF_SYS_FILE_B = 16,
Christopher Ferris106b3a82016-08-24 12:15:38 -070096 DQF_PRIVATE
Christopher Ferris05d08e92016-02-04 13:16:38 -080097};
98#define DQF_ROOT_SQUASH (1 << DQF_ROOT_SQUASH_B)
99#define DQF_SYS_FILE (1 << DQF_SYS_FILE_B)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700100struct if_dqinfo {
Tao Baod7db5942015-01-28 10:07:51 -0800101 __u64 dqi_bgrace;
102 __u64 dqi_igrace;
103 __u32 dqi_flags;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700104 __u32 dqi_valid;
Ben Cheng655a7c02013-10-16 16:09:24 -0700105};
106#define QUOTA_NL_NOWARN 0
107#define QUOTA_NL_IHARDWARN 1
Christopher Ferris106b3a82016-08-24 12:15:38 -0700108#define QUOTA_NL_ISOFTLONGWARN 2
Ben Cheng655a7c02013-10-16 16:09:24 -0700109#define QUOTA_NL_ISOFTWARN 3
110#define QUOTA_NL_BHARDWARN 4
111#define QUOTA_NL_BSOFTLONGWARN 5
Christopher Ferris106b3a82016-08-24 12:15:38 -0700112#define QUOTA_NL_BSOFTWARN 6
Ben Cheng655a7c02013-10-16 16:09:24 -0700113#define QUOTA_NL_IHARDBELOW 7
114#define QUOTA_NL_ISOFTBELOW 8
115#define QUOTA_NL_BHARDBELOW 9
Christopher Ferris106b3a82016-08-24 12:15:38 -0700116#define QUOTA_NL_BSOFTBELOW 10
Ben Cheng655a7c02013-10-16 16:09:24 -0700117enum {
Tao Baod7db5942015-01-28 10:07:51 -0800118 QUOTA_NL_C_UNSPEC,
119 QUOTA_NL_C_WARNING,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700120 __QUOTA_NL_C_MAX,
Ben Cheng655a7c02013-10-16 16:09:24 -0700121};
122#define QUOTA_NL_C_MAX (__QUOTA_NL_C_MAX - 1)
123enum {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700124 QUOTA_NL_A_UNSPEC,
Tao Baod7db5942015-01-28 10:07:51 -0800125 QUOTA_NL_A_QTYPE,
126 QUOTA_NL_A_EXCESS_ID,
127 QUOTA_NL_A_WARNING,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700128 QUOTA_NL_A_DEV_MAJOR,
Tao Baod7db5942015-01-28 10:07:51 -0800129 QUOTA_NL_A_DEV_MINOR,
130 QUOTA_NL_A_CAUSED_ID,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700131 QUOTA_NL_A_PAD,
Tao Baod7db5942015-01-28 10:07:51 -0800132 __QUOTA_NL_A_MAX,
Ben Cheng655a7c02013-10-16 16:09:24 -0700133};
Ben Cheng655a7c02013-10-16 16:09:24 -0700134#define QUOTA_NL_A_MAX (__QUOTA_NL_A_MAX - 1)
135#endif