1 /****************************************************************************
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>
22 #define XQM_CMD(x) (('X' << 8) + (x))
23 #define XQM_COMMAND(x) (((x) & (0xff << 8)) == ('X' << 8))
24 #define XQM_USRQUOTA 0
25 #define XQM_GRPQUOTA 1
26 #define XQM_PRJQUOTA 2
27 #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)
31 #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)
35 #define Q_XGETQSTATV XQM_CMD(8)
36 #define Q_XGETNEXTQUOTA XQM_CMD(9)
37 #define FS_DQUOT_VERSION 1
38 typedef struct fs_disk_quota {
39   __s8 d_version;
40   __s8 d_flags;
41   __u16 d_fieldmask;
42   __u32 d_id;
43   __u64 d_blk_hardlimit;
44   __u64 d_blk_softlimit;
45   __u64 d_ino_hardlimit;
46   __u64 d_ino_softlimit;
47   __u64 d_bcount;
48   __u64 d_icount;
49   __s32 d_itimer;
50   __s32 d_btimer;
51   __u16 d_iwarns;
52   __u16 d_bwarns;
53   __s32 d_padding2;
54   __u64 d_rtb_hardlimit;
55   __u64 d_rtb_softlimit;
56   __u64 d_rtbcount;
57   __s32 d_rtbtimer;
58   __u16 d_rtbwarns;
59   __s16 d_padding3;
60   char d_padding4[8];
61 } fs_disk_quota_t;
62 #define FS_DQ_ISOFT (1 << 0)
63 #define FS_DQ_IHARD (1 << 1)
64 #define FS_DQ_BSOFT (1 << 2)
65 #define FS_DQ_BHARD (1 << 3)
66 #define FS_DQ_RTBSOFT (1 << 4)
67 #define FS_DQ_RTBHARD (1 << 5)
68 #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)
71 #define FS_DQ_RTBTIMER (1 << 8)
72 #define FS_DQ_TIMER_MASK (FS_DQ_BTIMER | FS_DQ_ITIMER | FS_DQ_RTBTIMER)
73 #define FS_DQ_BWARNS (1 << 9)
74 #define FS_DQ_IWARNS (1 << 10)
75 #define FS_DQ_RTBWARNS (1 << 11)
76 #define FS_DQ_WARNS_MASK (FS_DQ_BWARNS | FS_DQ_IWARNS | FS_DQ_RTBWARNS)
77 #define FS_DQ_BCOUNT (1 << 12)
78 #define FS_DQ_ICOUNT (1 << 13)
79 #define FS_DQ_RTBCOUNT (1 << 14)
80 #define FS_DQ_ACCT_MASK (FS_DQ_BCOUNT | FS_DQ_ICOUNT | FS_DQ_RTBCOUNT)
81 #define FS_QUOTA_UDQ_ACCT (1 << 0)
82 #define FS_QUOTA_UDQ_ENFD (1 << 1)
83 #define FS_QUOTA_GDQ_ACCT (1 << 2)
84 #define FS_QUOTA_GDQ_ENFD (1 << 3)
85 #define FS_QUOTA_PDQ_ACCT (1 << 4)
86 #define FS_QUOTA_PDQ_ENFD (1 << 5)
87 #define FS_USER_QUOTA (1 << 0)
88 #define FS_PROJ_QUOTA (1 << 1)
89 #define FS_GROUP_QUOTA (1 << 2)
90 #define FS_QSTAT_VERSION 1
91 typedef struct fs_qfilestat {
92   __u64 qfs_ino;
93   __u64 qfs_nblks;
94   __u32 qfs_nextents;
95 } fs_qfilestat_t;
96 typedef struct fs_quota_stat {
97   __s8 qs_version;
98   __u16 qs_flags;
99   __s8 qs_pad;
100   fs_qfilestat_t qs_uquota;
101   fs_qfilestat_t qs_gquota;
102   __u32 qs_incoredqs;
103   __s32 qs_btimelimit;
104   __s32 qs_itimelimit;
105   __s32 qs_rtbtimelimit;
106   __u16 qs_bwarnlimit;
107   __u16 qs_iwarnlimit;
108 } fs_quota_stat_t;
109 #define FS_QSTATV_VERSION1 1
110 struct fs_qfilestatv {
111   __u64 qfs_ino;
112   __u64 qfs_nblks;
113   __u32 qfs_nextents;
114   __u32 qfs_pad;
115 };
116 struct fs_quota_statv {
117   __s8 qs_version;
118   __u8 qs_pad1;
119   __u16 qs_flags;
120   __u32 qs_incoredqs;
121   struct fs_qfilestatv qs_uquota;
122   struct fs_qfilestatv qs_gquota;
123   struct fs_qfilestatv qs_pquota;
124   __s32 qs_btimelimit;
125   __s32 qs_itimelimit;
126   __s32 qs_rtbtimelimit;
127   __u16 qs_bwarnlimit;
128   __u16 qs_iwarnlimit;
129   __u64 qs_pad2[8];
130 };
131 #endif
132