blob: db7c7e5ef8567feb903c3f1283cc72bc712d60c9 [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 _LINUX_DQBLK_XFS_H
20#define _LINUX_DQBLK_XFS_H
21#include <linux/types.h>
Tao Baod7db5942015-01-28 10:07:51 -080022#define XQM_CMD(x) (('X' << 8) + (x))
Tao Baod7db5942015-01-28 10:07:51 -080023#define XQM_COMMAND(x) (((x) & (0xff << 8)) == ('X' << 8))
Ben Cheng655a7c02013-10-16 16:09:24 -070024#define XQM_USRQUOTA 0
25#define XQM_GRPQUOTA 1
26#define XQM_PRJQUOTA 2
Ben Cheng655a7c02013-10-16 16:09:24 -070027#define XQM_MAXQUOTAS 3
28#define Q_XQUOTAON XQM_CMD(1)
29#define Q_XQUOTAOFF XQM_CMD(2)
30#define Q_XGETQUOTA XQM_CMD(3)
Ben Cheng655a7c02013-10-16 16:09:24 -070031#define Q_XSETQLIM XQM_CMD(4)
32#define Q_XGETQSTAT XQM_CMD(5)
33#define Q_XQUOTARM XQM_CMD(6)
34#define Q_XQUOTASYNC XQM_CMD(7)
Christopher Ferris38062f92014-07-09 15:33:25 -070035#define Q_XGETQSTATV XQM_CMD(8)
Christopher Ferris106b3a82016-08-24 12:15:38 -070036#define Q_XGETNEXTQUOTA XQM_CMD(9)
Ben Cheng655a7c02013-10-16 16:09:24 -070037#define FS_DQUOT_VERSION 1
38typedef struct fs_disk_quota {
Christopher Ferris106b3a82016-08-24 12:15:38 -070039 __s8 d_version;
Tao Baod7db5942015-01-28 10:07:51 -080040 __s8 d_flags;
41 __u16 d_fieldmask;
42 __u32 d_id;
Christopher Ferris106b3a82016-08-24 12:15:38 -070043 __u64 d_blk_hardlimit;
Tao Baod7db5942015-01-28 10:07:51 -080044 __u64 d_blk_softlimit;
45 __u64 d_ino_hardlimit;
46 __u64 d_ino_softlimit;
Christopher Ferris106b3a82016-08-24 12:15:38 -070047 __u64 d_bcount;
Tao Baod7db5942015-01-28 10:07:51 -080048 __u64 d_icount;
49 __s32 d_itimer;
50 __s32 d_btimer;
Christopher Ferris106b3a82016-08-24 12:15:38 -070051 __u16 d_iwarns;
Tao Baod7db5942015-01-28 10:07:51 -080052 __u16 d_bwarns;
Christopher Ferris32ff3f82020-12-14 13:10:04 -080053 __s8 d_itimer_hi;
54 __s8 d_btimer_hi;
55 __s8 d_rtbtimer_hi;
56 __s8 d_padding2;
Tao Baod7db5942015-01-28 10:07:51 -080057 __u64 d_rtb_hardlimit;
Christopher Ferris106b3a82016-08-24 12:15:38 -070058 __u64 d_rtb_softlimit;
Tao Baod7db5942015-01-28 10:07:51 -080059 __u64 d_rtbcount;
60 __s32 d_rtbtimer;
61 __u16 d_rtbwarns;
Christopher Ferris106b3a82016-08-24 12:15:38 -070062 __s16 d_padding3;
Tao Baod7db5942015-01-28 10:07:51 -080063 char d_padding4[8];
Ben Cheng655a7c02013-10-16 16:09:24 -070064} fs_disk_quota_t;
Tao Baod7db5942015-01-28 10:07:51 -080065#define FS_DQ_ISOFT (1 << 0)
Christopher Ferris106b3a82016-08-24 12:15:38 -070066#define FS_DQ_IHARD (1 << 1)
Tao Baod7db5942015-01-28 10:07:51 -080067#define FS_DQ_BSOFT (1 << 2)
68#define FS_DQ_BHARD (1 << 3)
69#define FS_DQ_RTBSOFT (1 << 4)
Christopher Ferris106b3a82016-08-24 12:15:38 -070070#define FS_DQ_RTBHARD (1 << 5)
Tao Baod7db5942015-01-28 10:07:51 -080071#define FS_DQ_LIMIT_MASK (FS_DQ_ISOFT | FS_DQ_IHARD | FS_DQ_BSOFT | FS_DQ_BHARD | FS_DQ_RTBSOFT | FS_DQ_RTBHARD)
72#define FS_DQ_BTIMER (1 << 6)
73#define FS_DQ_ITIMER (1 << 7)
Christopher Ferris106b3a82016-08-24 12:15:38 -070074#define FS_DQ_RTBTIMER (1 << 8)
Christopher Ferris38062f92014-07-09 15:33:25 -070075#define FS_DQ_TIMER_MASK (FS_DQ_BTIMER | FS_DQ_ITIMER | FS_DQ_RTBTIMER)
Tao Baod7db5942015-01-28 10:07:51 -080076#define FS_DQ_BWARNS (1 << 9)
77#define FS_DQ_IWARNS (1 << 10)
Christopher Ferris106b3a82016-08-24 12:15:38 -070078#define FS_DQ_RTBWARNS (1 << 11)
Christopher Ferris38062f92014-07-09 15:33:25 -070079#define FS_DQ_WARNS_MASK (FS_DQ_BWARNS | FS_DQ_IWARNS | FS_DQ_RTBWARNS)
Tao Baod7db5942015-01-28 10:07:51 -080080#define FS_DQ_BCOUNT (1 << 12)
81#define FS_DQ_ICOUNT (1 << 13)
Christopher Ferris106b3a82016-08-24 12:15:38 -070082#define FS_DQ_RTBCOUNT (1 << 14)
Christopher Ferris38062f92014-07-09 15:33:25 -070083#define FS_DQ_ACCT_MASK (FS_DQ_BCOUNT | FS_DQ_ICOUNT | FS_DQ_RTBCOUNT)
Christopher Ferris32ff3f82020-12-14 13:10:04 -080084#define FS_DQ_BIGTIME (1 << 15)
Tao Baod7db5942015-01-28 10:07:51 -080085#define FS_QUOTA_UDQ_ACCT (1 << 0)
86#define FS_QUOTA_UDQ_ENFD (1 << 1)
Christopher Ferris106b3a82016-08-24 12:15:38 -070087#define FS_QUOTA_GDQ_ACCT (1 << 2)
Tao Baod7db5942015-01-28 10:07:51 -080088#define FS_QUOTA_GDQ_ENFD (1 << 3)
89#define FS_QUOTA_PDQ_ACCT (1 << 4)
90#define FS_QUOTA_PDQ_ENFD (1 << 5)
Christopher Ferris106b3a82016-08-24 12:15:38 -070091#define FS_USER_QUOTA (1 << 0)
Tao Baod7db5942015-01-28 10:07:51 -080092#define FS_PROJ_QUOTA (1 << 1)
93#define FS_GROUP_QUOTA (1 << 2)
Ben Cheng655a7c02013-10-16 16:09:24 -070094#define FS_QSTAT_VERSION 1
Christopher Ferris106b3a82016-08-24 12:15:38 -070095typedef struct fs_qfilestat {
Tao Baod7db5942015-01-28 10:07:51 -080096 __u64 qfs_ino;
97 __u64 qfs_nblks;
98 __u32 qfs_nextents;
Christopher Ferris106b3a82016-08-24 12:15:38 -070099} fs_qfilestat_t;
Christopher Ferris38062f92014-07-09 15:33:25 -0700100typedef struct fs_quota_stat {
Tao Baod7db5942015-01-28 10:07:51 -0800101 __s8 qs_version;
102 __u16 qs_flags;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700103 __s8 qs_pad;
Tao Baod7db5942015-01-28 10:07:51 -0800104 fs_qfilestat_t qs_uquota;
105 fs_qfilestat_t qs_gquota;
106 __u32 qs_incoredqs;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700107 __s32 qs_btimelimit;
Tao Baod7db5942015-01-28 10:07:51 -0800108 __s32 qs_itimelimit;
109 __s32 qs_rtbtimelimit;
110 __u16 qs_bwarnlimit;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700111 __u16 qs_iwarnlimit;
Christopher Ferris38062f92014-07-09 15:33:25 -0700112} fs_quota_stat_t;
113#define FS_QSTATV_VERSION1 1
114struct fs_qfilestatv {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700115 __u64 qfs_ino;
Tao Baod7db5942015-01-28 10:07:51 -0800116 __u64 qfs_nblks;
117 __u32 qfs_nextents;
118 __u32 qfs_pad;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700119};
Christopher Ferris38062f92014-07-09 15:33:25 -0700120struct fs_quota_statv {
Tao Baod7db5942015-01-28 10:07:51 -0800121 __s8 qs_version;
122 __u8 qs_pad1;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700123 __u16 qs_flags;
Tao Baod7db5942015-01-28 10:07:51 -0800124 __u32 qs_incoredqs;
125 struct fs_qfilestatv qs_uquota;
126 struct fs_qfilestatv qs_gquota;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700127 struct fs_qfilestatv qs_pquota;
Tao Baod7db5942015-01-28 10:07:51 -0800128 __s32 qs_btimelimit;
129 __s32 qs_itimelimit;
130 __s32 qs_rtbtimelimit;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700131 __u16 qs_bwarnlimit;
Tao Baod7db5942015-01-28 10:07:51 -0800132 __u16 qs_iwarnlimit;
133 __u64 qs_pad2[8];
Christopher Ferris38062f92014-07-09 15:33:25 -0700134};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700135#endif