1*53ee8cc1Swenshuai.xi #ifndef _LINUX_QUOTAIO_V1_H 2*53ee8cc1Swenshuai.xi #define _LINUX_QUOTAIO_V1_H 3*53ee8cc1Swenshuai.xi 4*53ee8cc1Swenshuai.xi #include <linux/types.h> 5*53ee8cc1Swenshuai.xi 6*53ee8cc1Swenshuai.xi /* 7*53ee8cc1Swenshuai.xi * The following constants define the amount of time given a user 8*53ee8cc1Swenshuai.xi * before the soft limits are treated as hard limits (usually resulting 9*53ee8cc1Swenshuai.xi * in an allocation failure). The timer is started when the user crosses 10*53ee8cc1Swenshuai.xi * their soft limit, it is reset when they go below their soft limit. 11*53ee8cc1Swenshuai.xi */ 12*53ee8cc1Swenshuai.xi #define MAX_IQ_TIME 604800 /* (7*24*60*60) 1 week */ 13*53ee8cc1Swenshuai.xi #define MAX_DQ_TIME 604800 /* (7*24*60*60) 1 week */ 14*53ee8cc1Swenshuai.xi 15*53ee8cc1Swenshuai.xi /* 16*53ee8cc1Swenshuai.xi * The following structure defines the format of the disk quota file 17*53ee8cc1Swenshuai.xi * (as it appears on disk) - the file is an array of these structures 18*53ee8cc1Swenshuai.xi * indexed by user or group number. 19*53ee8cc1Swenshuai.xi */ 20*53ee8cc1Swenshuai.xi struct v1_disk_dqblk { 21*53ee8cc1Swenshuai.xi __u32 dqb_bhardlimit; /* absolute limit on disk blks alloc */ 22*53ee8cc1Swenshuai.xi __u32 dqb_bsoftlimit; /* preferred limit on disk blks */ 23*53ee8cc1Swenshuai.xi __u32 dqb_curblocks; /* current block count */ 24*53ee8cc1Swenshuai.xi __u32 dqb_ihardlimit; /* absolute limit on allocated inodes */ 25*53ee8cc1Swenshuai.xi __u32 dqb_isoftlimit; /* preferred inode limit */ 26*53ee8cc1Swenshuai.xi __u32 dqb_curinodes; /* current # allocated inodes */ 27*53ee8cc1Swenshuai.xi time_t dqb_btime; /* time limit for excessive disk use */ 28*53ee8cc1Swenshuai.xi time_t dqb_itime; /* time limit for excessive inode use */ 29*53ee8cc1Swenshuai.xi }; 30*53ee8cc1Swenshuai.xi 31*53ee8cc1Swenshuai.xi #define v1_dqoff(UID) ((loff_t)((UID) * sizeof (struct v1_disk_dqblk))) 32*53ee8cc1Swenshuai.xi 33*53ee8cc1Swenshuai.xi #endif /* _LINUX_QUOTAIO_V1_H */ 34