blob: 969837031a85ccbba871b218360b9e1adc1d1841 [file] [log] [blame]
Elliott Hughes180edef2023-11-02 00:08:05 +00001/*
2 * This file is auto-generated. Modifications will be lost.
3 *
4 * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5 * for more information.
6 */
Ben Cheng655a7c02013-10-16 16:09:24 -07007#ifndef _UAPI_LINUX_QUOTA_
8#define _UAPI_LINUX_QUOTA_
Ben Cheng655a7c02013-10-16 16:09:24 -07009#include <linux/types.h>
Christopher Ferris05d08e92016-02-04 13:16:38 -080010#define __DQUOT_VERSION__ "dquot_6.6.0"
11#define MAXQUOTAS 3
Ben Cheng655a7c02013-10-16 16:09:24 -070012#define USRQUOTA 0
13#define GRPQUOTA 1
Christopher Ferris05d08e92016-02-04 13:16:38 -080014#define PRJQUOTA 2
15#define INITQFNAMES { "user", "group", "project", "undefined", \
Tao Baod7db5942015-01-28 10:07:51 -080016};
Ben Cheng655a7c02013-10-16 16:09:24 -070017#define SUBCMDMASK 0x00ff
18#define SUBCMDSHIFT 8
Christopher Ferris05d08e92016-02-04 13:16:38 -080019#define QCMD(cmd,type) (((cmd) << SUBCMDSHIFT) | ((type) & SUBCMDMASK))
Ben Cheng655a7c02013-10-16 16:09:24 -070020#define Q_SYNC 0x800001
21#define Q_QUOTAON 0x800002
22#define Q_QUOTAOFF 0x800003
Christopher Ferris05d08e92016-02-04 13:16:38 -080023#define Q_GETFMT 0x800004
Ben Cheng655a7c02013-10-16 16:09:24 -070024#define Q_GETINFO 0x800005
25#define Q_SETINFO 0x800006
26#define Q_GETQUOTA 0x800007
Christopher Ferris05d08e92016-02-04 13:16:38 -080027#define Q_SETQUOTA 0x800008
Christopher Ferris106b3a82016-08-24 12:15:38 -070028#define Q_GETNEXTQUOTA 0x800009
Ben Cheng655a7c02013-10-16 16:09:24 -070029#define QFMT_VFS_OLD 1
30#define QFMT_VFS_V0 2
Christopher Ferris106b3a82016-08-24 12:15:38 -070031#define QFMT_OCFS2 3
Christopher Ferris05d08e92016-02-04 13:16:38 -080032#define QFMT_VFS_V1 4
Christopher Ferris67d1e5e2023-10-31 13:36:37 -070033#define QFMT_SHMEM 5
Ben Cheng655a7c02013-10-16 16:09:24 -070034#define QIF_DQBLKSIZE_BITS 10
35#define QIF_DQBLKSIZE (1 << QIF_DQBLKSIZE_BITS)
Christopher Ferris106b3a82016-08-24 12:15:38 -070036enum {
Christopher Ferris05d08e92016-02-04 13:16:38 -080037 QIF_BLIMITS_B = 0,
Tao Baod7db5942015-01-28 10:07:51 -080038 QIF_SPACE_B,
39 QIF_ILIMITS_B,
Christopher Ferris106b3a82016-08-24 12:15:38 -070040 QIF_INODES_B,
Christopher Ferris05d08e92016-02-04 13:16:38 -080041 QIF_BTIME_B,
Tao Baod7db5942015-01-28 10:07:51 -080042 QIF_ITIME_B,
Ben Cheng655a7c02013-10-16 16:09:24 -070043};
Christopher Ferris106b3a82016-08-24 12:15:38 -070044#define QIF_BLIMITS (1 << QIF_BLIMITS_B)
Christopher Ferris05d08e92016-02-04 13:16:38 -080045#define QIF_SPACE (1 << QIF_SPACE_B)
Ben Cheng655a7c02013-10-16 16:09:24 -070046#define QIF_ILIMITS (1 << QIF_ILIMITS_B)
47#define QIF_INODES (1 << QIF_INODES_B)
Christopher Ferris106b3a82016-08-24 12:15:38 -070048#define QIF_BTIME (1 << QIF_BTIME_B)
Christopher Ferris05d08e92016-02-04 13:16:38 -080049#define QIF_ITIME (1 << QIF_ITIME_B)
Ben Cheng655a7c02013-10-16 16:09:24 -070050#define QIF_LIMITS (QIF_BLIMITS | QIF_ILIMITS)
51#define QIF_USAGE (QIF_SPACE | QIF_INODES)
Christopher Ferris106b3a82016-08-24 12:15:38 -070052#define QIF_TIMES (QIF_BTIME | QIF_ITIME)
Christopher Ferris05d08e92016-02-04 13:16:38 -080053#define QIF_ALL (QIF_LIMITS | QIF_USAGE | QIF_TIMES)
Ben Cheng655a7c02013-10-16 16:09:24 -070054struct if_dqblk {
Tao Baod7db5942015-01-28 10:07:51 -080055 __u64 dqb_bhardlimit;
Christopher Ferris106b3a82016-08-24 12:15:38 -070056 __u64 dqb_bsoftlimit;
57 __u64 dqb_curspace;
58 __u64 dqb_ihardlimit;
59 __u64 dqb_isoftlimit;
Christopher Ferris106b3a82016-08-24 12:15:38 -070060 __u64 dqb_curinodes;
61 __u64 dqb_btime;
62 __u64 dqb_itime;
63 __u32 dqb_valid;
Christopher Ferris106b3a82016-08-24 12:15:38 -070064};
65struct if_nextdqblk {
66 __u64 dqb_bhardlimit;
Tao Baod7db5942015-01-28 10:07:51 -080067 __u64 dqb_bsoftlimit;
Christopher Ferris05d08e92016-02-04 13:16:38 -080068 __u64 dqb_curspace;
Tao Baod7db5942015-01-28 10:07:51 -080069 __u64 dqb_ihardlimit;
70 __u64 dqb_isoftlimit;
71 __u64 dqb_curinodes;
Christopher Ferris05d08e92016-02-04 13:16:38 -080072 __u64 dqb_btime;
Tao Baod7db5942015-01-28 10:07:51 -080073 __u64 dqb_itime;
74 __u32 dqb_valid;
Christopher Ferris106b3a82016-08-24 12:15:38 -070075 __u32 dqb_id;
Christopher Ferris106b3a82016-08-24 12:15:38 -070076};
Christopher Ferris05d08e92016-02-04 13:16:38 -080077#define IIF_BGRACE 1
Ben Cheng655a7c02013-10-16 16:09:24 -070078#define IIF_IGRACE 2
79#define IIF_FLAGS 4
Christopher Ferris106b3a82016-08-24 12:15:38 -070080#define IIF_ALL (IIF_BGRACE | IIF_IGRACE | IIF_FLAGS)
Christopher Ferris05d08e92016-02-04 13:16:38 -080081enum {
82 DQF_ROOT_SQUASH_B = 0,
83 DQF_SYS_FILE_B = 16,
Christopher Ferris106b3a82016-08-24 12:15:38 -070084 DQF_PRIVATE
Christopher Ferris05d08e92016-02-04 13:16:38 -080085};
86#define DQF_ROOT_SQUASH (1 << DQF_ROOT_SQUASH_B)
87#define DQF_SYS_FILE (1 << DQF_SYS_FILE_B)
Christopher Ferris106b3a82016-08-24 12:15:38 -070088struct if_dqinfo {
Tao Baod7db5942015-01-28 10:07:51 -080089 __u64 dqi_bgrace;
90 __u64 dqi_igrace;
91 __u32 dqi_flags;
Christopher Ferris106b3a82016-08-24 12:15:38 -070092 __u32 dqi_valid;
Ben Cheng655a7c02013-10-16 16:09:24 -070093};
94#define QUOTA_NL_NOWARN 0
95#define QUOTA_NL_IHARDWARN 1
Christopher Ferris106b3a82016-08-24 12:15:38 -070096#define QUOTA_NL_ISOFTLONGWARN 2
Ben Cheng655a7c02013-10-16 16:09:24 -070097#define QUOTA_NL_ISOFTWARN 3
98#define QUOTA_NL_BHARDWARN 4
99#define QUOTA_NL_BSOFTLONGWARN 5
Christopher Ferris106b3a82016-08-24 12:15:38 -0700100#define QUOTA_NL_BSOFTWARN 6
Ben Cheng655a7c02013-10-16 16:09:24 -0700101#define QUOTA_NL_IHARDBELOW 7
102#define QUOTA_NL_ISOFTBELOW 8
103#define QUOTA_NL_BHARDBELOW 9
Christopher Ferris106b3a82016-08-24 12:15:38 -0700104#define QUOTA_NL_BSOFTBELOW 10
Ben Cheng655a7c02013-10-16 16:09:24 -0700105enum {
Tao Baod7db5942015-01-28 10:07:51 -0800106 QUOTA_NL_C_UNSPEC,
107 QUOTA_NL_C_WARNING,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700108 __QUOTA_NL_C_MAX,
Ben Cheng655a7c02013-10-16 16:09:24 -0700109};
110#define QUOTA_NL_C_MAX (__QUOTA_NL_C_MAX - 1)
111enum {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700112 QUOTA_NL_A_UNSPEC,
Tao Baod7db5942015-01-28 10:07:51 -0800113 QUOTA_NL_A_QTYPE,
114 QUOTA_NL_A_EXCESS_ID,
115 QUOTA_NL_A_WARNING,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700116 QUOTA_NL_A_DEV_MAJOR,
Tao Baod7db5942015-01-28 10:07:51 -0800117 QUOTA_NL_A_DEV_MINOR,
118 QUOTA_NL_A_CAUSED_ID,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700119 QUOTA_NL_A_PAD,
Tao Baod7db5942015-01-28 10:07:51 -0800120 __QUOTA_NL_A_MAX,
Ben Cheng655a7c02013-10-16 16:09:24 -0700121};
Ben Cheng655a7c02013-10-16 16:09:24 -0700122#define QUOTA_NL_A_MAX (__QUOTA_NL_A_MAX - 1)
123#endif