Initial commit to Gerrit
[profile/ivi/quota.git] / dqblk_v2.h
1 /*
2  *
3  *      Header file for disk format of new quotafile format
4  *
5  */
6
7 #ifndef GUARD_DQBLK_V2_H
8 #define GUARD_DQBLK_V2_H
9
10 #include <sys/types.h>
11 #include "quota_tree.h"
12
13 #define Q_V2_GETQUOTA   0x0D00  /* Get limits and usage */
14 #define Q_V2_SETQUOTA   0x0E00  /* Set limits and usage */
15 #define Q_V2_SETUSE     0x0F00  /* Set only usage */
16 #define Q_V2_SETQLIM    0x0700  /* Set only limits */
17 #define Q_V2_GETINFO    0x0900  /* Get information about quota */
18 #define Q_V2_SETINFO    0x0A00  /* Set information about quota */
19 #define Q_V2_SETGRACE   0x0B00  /* Set just grace times in quotafile information */
20 #define Q_V2_SETFLAGS   0x0C00  /* Set just flags in quotafile information */
21 #define Q_V2_GETSTATS   0x1100  /* get collected stats (before proc was used) */
22
23 /* Structure for format specific information */
24 struct v2_mem_dqinfo {
25         struct qtree_mem_dqinfo dqi_qtree;
26         uint dqi_flags;         /* Flags set in quotafile */
27         uint dqi_used_entries;  /* Number of entries in file - updated by scan_dquots */
28         uint dqi_data_blocks;   /* Number of data blocks in file - updated by scan_dquots */
29 };
30
31 struct v2_mem_dqblk {
32         loff_t dqb_off;         /* Offset of dquot in file */
33 };
34
35 struct quotafile_ops;           /* Will be defined later in quotaio.h */
36
37 /* Operations above this format */
38 extern struct quotafile_ops quotafile_ops_2;
39
40 #endif