Update release notes, etc., for the 1.47.2 release
[e2fsprogs.git] / lib / support / quotaio_v2.h
blob35054cafaa236e6c6ea7c27c9965c4f4c6a76bf0
1 /*
3 * Header file for disk format of new quotafile format
5 */
7 #ifndef GUARD_QUOTAIO_V2_H
8 #define GUARD_QUOTAIO_V2_H
10 #include <sys/types.h>
11 #include "quotaio.h"
13 /* Offset of info header in file */
14 #define V2_DQINFOOFF sizeof(struct v2_disk_dqheader)
15 /* Supported version of quota-tree format */
16 #define V2_VERSION_R1 1
17 #define V2_VERSION_R0 0
19 struct v2_disk_dqheader {
20 __le32 dqh_magic; /* Magic number identifying file */
21 __le32 dqh_version; /* File version */
22 } __attribute__ ((packed));
24 /* Flags for version specific files */
25 #define V2_DQF_MASK 0x0000 /* Mask for all valid ondisk flags */
27 /* Header with type and version specific information */
28 struct v2_disk_dqinfo {
29 __le32 dqi_bgrace; /* Time before block soft limit becomes
30 * hard limit */
31 __le32 dqi_igrace; /* Time before inode soft limit becomes
32 * hard limit */
33 __le32 dqi_flags; /* Flags for quotafile (DQF_*) */
34 __le32 dqi_blocks; /* Number of blocks in file */
35 __le32 dqi_free_blk; /* Number of first free block in the list */
36 __le32 dqi_free_entry; /* Number of block with at least one
37 * free entry */
38 } __attribute__ ((packed));
40 struct v2r0_disk_dqblk {
41 __le32 dqb_id; /* id this quota applies to */
42 __le32 dqb_ihardlimit; /* absolute limit on allocated inodes */
43 __le32 dqb_isoftlimit; /* preferred inode limit */
44 __le32 dqb_curinodes; /* current # allocated inodes */
45 __le32 dqb_bhardlimit; /* absolute limit on disk space
46 * (in QUOTABLOCK_SIZE) */
47 __le32 dqb_bsoftlimit; /* preferred limit on disk space
48 * (in QUOTABLOCK_SIZE) */
49 __le64 dqb_curspace; /* current space occupied (in bytes) */
50 __le64 dqb_btime; /* time limit for excessive disk use */
51 __le64 dqb_itime; /* time limit for excessive inode use */
52 } __attribute__ ((packed));
54 struct v2r1_disk_dqblk {
55 __le32 dqb_id; /* id this quota applies to */
56 __le32 dqb_pad;
57 __le64 dqb_ihardlimit; /* absolute limit on allocated inodes */
58 __le64 dqb_isoftlimit; /* preferred inode limit */
59 __le64 dqb_curinodes; /* current # allocated inodes */
60 __le64 dqb_bhardlimit; /* absolute limit on disk space
61 * (in QUOTABLOCK_SIZE) */
62 __le64 dqb_bsoftlimit; /* preferred limit on disk space
63 * (in QUOTABLOCK_SIZE) */
64 __le64 dqb_curspace; /* current space occupied (in bytes) */
65 __le64 dqb_btime; /* time limit for excessive disk use */
66 __le64 dqb_itime; /* time limit for excessive inode use */
67 } __attribute__ ((packed));
69 #endif