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