Prva inačica za buster
[sysadmin-cn.git] / quotaio_v1.h
1 /*
2  *      Headerfile for old quotafile format
3  */
4
5 #ifndef _QUOTAIO_V1_H
6 #define _QUOTAIO_V1_H
7
8 #include <sys/types.h>
9
10 #define V1_DQBLK_SIZE_BITS 10
11 #define V1_DQBLK_SIZE (1 << V1_DQBLK_SIZE_BITS) /* Size of one quota block in bytes in old format */
12
13 #define V1_DQOFF(__id) ((loff_t) ((__id) * sizeof(struct v1_disk_dqblk)))
14
15 /* Structure of quota on disk */
16 struct v1_disk_dqblk {
17         u_int32_t dqb_bhardlimit;       /* absolute limit on disk blks alloc */
18         u_int32_t dqb_bsoftlimit;       /* preferred limit on disk blks */
19         u_int32_t dqb_curblocks;        /* current block count */
20         u_int32_t dqb_ihardlimit;       /* maximum # allocated inodes */
21         u_int32_t dqb_isoftlimit;       /* preferred limit on inodes */
22         u_int32_t dqb_curinodes;        /* current # allocated inodes */
23         time_t dqb_btime;       /* time limit for excessive disk use */
24         time_t dqb_itime;       /* time limit for excessive files */
25 } __attribute__ ((packed));
26
27 /* Structure used for communication with kernel */
28 struct v1_kern_dqblk {
29         u_int32_t dqb_bhardlimit;       /* absolute limit on disk blks alloc */
30         u_int32_t dqb_bsoftlimit;       /* preferred limit on disk blks */
31         u_int32_t dqb_curblocks;        /* current block count */
32         u_int32_t dqb_ihardlimit;       /* maximum # allocated inodes */
33         u_int32_t dqb_isoftlimit;       /* preferred inode limit */
34         u_int32_t dqb_curinodes;        /* current # allocated inodes */
35         time_t dqb_btime;       /* time limit for excessive disk use */
36         time_t dqb_itime;       /* time limit for excessive files */
37 };
38
39 struct v1_dqstats {
40         u_int32_t lookups;
41         u_int32_t drops;
42         u_int32_t reads;
43         u_int32_t writes;
44         u_int32_t cache_hits;
45         u_int32_t allocated_dquots;
46         u_int32_t free_dquots;
47         u_int32_t syncs;
48 };                                                                               
49 #endif