L4Re/departure

libext2fs/lib/libsupport/quotaio_v2.h

618:7123a7307a82
8 months ago Paul Boddie Introduced some debugging output control.
     1 /*     2  *     3  *	Header file for disk format of new quotafile format     4  *     5  */     6      7 #ifndef GUARD_QUOTAIO_V2_H     8 #define GUARD_QUOTAIO_V2_H     9     10 #include <sys/types.h>    11 #include "quotaio.h"    12     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 1    17     18 struct v2_disk_dqheader {    19 	__le32 dqh_magic;	/* Magic number identifying file */    20 	__le32 dqh_version;	/* File version */    21 } __attribute__ ((packed));    22     23 /* Flags for version specific files */    24 #define V2_DQF_MASK  0x0000	/* Mask for all valid ondisk flags */    25     26 /* Header with type and version specific information */    27 struct v2_disk_dqinfo {    28 	__le32 dqi_bgrace;	/* Time before block soft limit becomes    29 				 * hard limit */    30 	__le32 dqi_igrace;	/* Time before inode soft limit becomes    31 				 * hard limit */    32 	__le32 dqi_flags;	/* Flags for quotafile (DQF_*) */    33 	__le32 dqi_blocks;	/* Number of blocks in file */    34 	__le32 dqi_free_blk;	/* Number of first free block in the list */    35 	__le32 dqi_free_entry;	/* Number of block with at least one    36 					 * free entry */    37 } __attribute__ ((packed));    38     39 struct v2r1_disk_dqblk {    40 	__le32 dqb_id;	/* id this quota applies to */    41 	__le32 dqb_pad;    42 	__le64 dqb_ihardlimit;	/* absolute limit on allocated inodes */    43 	__le64 dqb_isoftlimit;	/* preferred inode limit */    44 	__le64 dqb_curinodes;	/* current # allocated inodes */    45 	__le64 dqb_bhardlimit;	/* absolute limit on disk space    46 					 * (in QUOTABLOCK_SIZE) */    47 	__le64 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));    53     54 #endif