blob: c8aebdac611571e58615e9c620238131b591c9b1 [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;
53 __s32 d_padding2;
54 __u64 d_rtb_hardlimit;
Christopher Ferris106b3a82016-08-24 12:15:38 -070055 __u64 d_rtb_softlimit;
Tao Baod7db5942015-01-28 10:07:51 -080056 __u64 d_rtbcount;
57 __s32 d_rtbtimer;
58 __u16 d_rtbwarns;
Christopher Ferris106b3a82016-08-24 12:15:38 -070059 __s16 d_padding3;
Tao Baod7db5942015-01-28 10:07:51 -080060 char d_padding4[8];
Ben Cheng655a7c02013-10-16 16:09:24 -070061} fs_disk_quota_t;
Tao Baod7db5942015-01-28 10:07:51 -080062#define FS_DQ_ISOFT (1 << 0)
Christopher Ferris106b3a82016-08-24 12:15:38 -070063#define FS_DQ_IHARD (1 << 1)
Tao Baod7db5942015-01-28 10:07:51 -080064#define FS_DQ_BSOFT (1 << 2)
65#define FS_DQ_BHARD (1 << 3)
66#define FS_DQ_RTBSOFT (1 << 4)
Christopher Ferris106b3a82016-08-24 12:15:38 -070067#define FS_DQ_RTBHARD (1 << 5)
Tao Baod7db5942015-01-28 10:07:51 -080068#define FS_DQ_LIMIT_MASK (FS_DQ_ISOFT | FS_DQ_IHARD | FS_DQ_BSOFT | FS_DQ_BHARD | FS_DQ_RTBSOFT | FS_DQ_RTBHARD)
69#define FS_DQ_BTIMER (1 << 6)
70#define FS_DQ_ITIMER (1 << 7)
Christopher Ferris106b3a82016-08-24 12:15:38 -070071#define FS_DQ_RTBTIMER (1 << 8)
Christopher Ferris38062f92014-07-09 15:33:25 -070072#define FS_DQ_TIMER_MASK (FS_DQ_BTIMER | FS_DQ_ITIMER | FS_DQ_RTBTIMER)
Tao Baod7db5942015-01-28 10:07:51 -080073#define FS_DQ_BWARNS (1 << 9)
74#define FS_DQ_IWARNS (1 << 10)
Christopher Ferris106b3a82016-08-24 12:15:38 -070075#define FS_DQ_RTBWARNS (1 << 11)
Christopher Ferris38062f92014-07-09 15:33:25 -070076#define FS_DQ_WARNS_MASK (FS_DQ_BWARNS | FS_DQ_IWARNS | FS_DQ_RTBWARNS)
Tao Baod7db5942015-01-28 10:07:51 -080077#define FS_DQ_BCOUNT (1 << 12)
78#define FS_DQ_ICOUNT (1 << 13)
Christopher Ferris106b3a82016-08-24 12:15:38 -070079#define FS_DQ_RTBCOUNT (1 << 14)
Christopher Ferris38062f92014-07-09 15:33:25 -070080#define FS_DQ_ACCT_MASK (FS_DQ_BCOUNT | FS_DQ_ICOUNT | FS_DQ_RTBCOUNT)
Tao Baod7db5942015-01-28 10:07:51 -080081#define FS_QUOTA_UDQ_ACCT (1 << 0)
82#define FS_QUOTA_UDQ_ENFD (1 << 1)
Christopher Ferris106b3a82016-08-24 12:15:38 -070083#define FS_QUOTA_GDQ_ACCT (1 << 2)
Tao Baod7db5942015-01-28 10:07:51 -080084#define FS_QUOTA_GDQ_ENFD (1 << 3)
85#define FS_QUOTA_PDQ_ACCT (1 << 4)
86#define FS_QUOTA_PDQ_ENFD (1 << 5)
Christopher Ferris106b3a82016-08-24 12:15:38 -070087#define FS_USER_QUOTA (1 << 0)
Tao Baod7db5942015-01-28 10:07:51 -080088#define FS_PROJ_QUOTA (1 << 1)
89#define FS_GROUP_QUOTA (1 << 2)
Ben Cheng655a7c02013-10-16 16:09:24 -070090#define FS_QSTAT_VERSION 1
Christopher Ferris106b3a82016-08-24 12:15:38 -070091typedef struct fs_qfilestat {
Tao Baod7db5942015-01-28 10:07:51 -080092 __u64 qfs_ino;
93 __u64 qfs_nblks;
94 __u32 qfs_nextents;
Christopher Ferris106b3a82016-08-24 12:15:38 -070095} fs_qfilestat_t;
Christopher Ferris38062f92014-07-09 15:33:25 -070096typedef struct fs_quota_stat {
Tao Baod7db5942015-01-28 10:07:51 -080097 __s8 qs_version;
98 __u16 qs_flags;
Christopher Ferris106b3a82016-08-24 12:15:38 -070099 __s8 qs_pad;
Tao Baod7db5942015-01-28 10:07:51 -0800100 fs_qfilestat_t qs_uquota;
101 fs_qfilestat_t qs_gquota;
102 __u32 qs_incoredqs;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700103 __s32 qs_btimelimit;
Tao Baod7db5942015-01-28 10:07:51 -0800104 __s32 qs_itimelimit;
105 __s32 qs_rtbtimelimit;
106 __u16 qs_bwarnlimit;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700107 __u16 qs_iwarnlimit;
Christopher Ferris38062f92014-07-09 15:33:25 -0700108} fs_quota_stat_t;
109#define FS_QSTATV_VERSION1 1
110struct fs_qfilestatv {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700111 __u64 qfs_ino;
Tao Baod7db5942015-01-28 10:07:51 -0800112 __u64 qfs_nblks;
113 __u32 qfs_nextents;
114 __u32 qfs_pad;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700115};
Christopher Ferris38062f92014-07-09 15:33:25 -0700116struct fs_quota_statv {
Tao Baod7db5942015-01-28 10:07:51 -0800117 __s8 qs_version;
118 __u8 qs_pad1;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700119 __u16 qs_flags;
Tao Baod7db5942015-01-28 10:07:51 -0800120 __u32 qs_incoredqs;
121 struct fs_qfilestatv qs_uquota;
122 struct fs_qfilestatv qs_gquota;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700123 struct fs_qfilestatv qs_pquota;
Tao Baod7db5942015-01-28 10:07:51 -0800124 __s32 qs_btimelimit;
125 __s32 qs_itimelimit;
126 __s32 qs_rtbtimelimit;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700127 __u16 qs_bwarnlimit;
Tao Baod7db5942015-01-28 10:07:51 -0800128 __u16 qs_iwarnlimit;
129 __u64 qs_pad2[8];
Christopher Ferris38062f92014-07-09 15:33:25 -0700130};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700131#endif