1 /* 2 * Definition of symbols used for backward compatible interface 3 */ 4 5 #ifndef _LINUX_QUOTACOMPAT_ 6 #define _LINUX_QUOTACOMPAT_ 7 8 #include <linux/types.h> 9 #include <linux/quota.h> 10 11 struct v1c_mem_dqblk { 12 __u32 dqb_bhardlimit; /* absolute limit on disk blks alloc */ 13 __u32 dqb_bsoftlimit; /* preferred limit on disk blks */ 14 __u32 dqb_curblocks; /* current block count */ 15 __u32 dqb_ihardlimit; /* maximum # allocated inodes */ 16 __u32 dqb_isoftlimit; /* preferred inode limit */ 17 __u32 dqb_curinodes; /* current # allocated inodes */ 18 time_t dqb_btime; /* time limit for excessive disk use */ 19 time_t dqb_itime; /* time limit for excessive files */ 20 }; 21 22 struct v1c_dqstats { 23 __u32 lookups; 24 __u32 drops; 25 __u32 reads; 26 __u32 writes; 27 __u32 cache_hits; 28 __u32 allocated_dquots; 29 __u32 free_dquots; 30 __u32 syncs; 31 }; 32 33 struct v2c_mem_dqblk { 34 unsigned int dqb_ihardlimit; 35 unsigned int dqb_isoftlimit; 36 unsigned int dqb_curinodes; 37 unsigned int dqb_bhardlimit; 38 unsigned int dqb_bsoftlimit; 39 qsize_t dqb_curspace; 40 __kernel_time_t dqb_btime; 41 __kernel_time_t dqb_itime; 42 }; 43 44 struct v2c_mem_dqinfo { 45 unsigned int dqi_bgrace; 46 unsigned int dqi_igrace; 47 unsigned int dqi_flags; 48 unsigned int dqi_blocks; 49 unsigned int dqi_free_blk; 50 unsigned int dqi_free_entry; 51 }; 52 53 struct v2c_dqstats { 54 __u32 lookups; 55 __u32 drops; 56 __u32 reads; 57 __u32 writes; 58 __u32 cache_hits; 59 __u32 allocated_dquots; 60 __u32 free_dquots; 61 __u32 syncs; 62 __u32 version; 63 }; 64 65 #define Q_COMP_QUOTAON 0x0100 /* enable quotas */ 66 #define Q_COMP_QUOTAOFF 0x0200 /* disable quotas */ 67 #define Q_COMP_SYNC 0x0600 /* sync disk copy of a filesystems quotas */ 68 69 #define Q_V1_GETQUOTA 0x0300 /* get limits and usage */ 70 #define Q_V1_SETQUOTA 0x0400 /* set limits and usage */ 71 #define Q_V1_SETUSE 0x0500 /* set usage */ 72 #define Q_V1_SETQLIM 0x0700 /* set limits */ 73 #define Q_V1_GETSTATS 0x0800 /* get collected stats */ 74 #define Q_V1_RSQUASH 0x1000 /* set root_squash option */ 75 76 #define Q_V2_SETQLIM 0x0700 /* set limits */ 77 #define Q_V2_GETINFO 0x0900 /* get info about quotas - graces, flags... */ 78 #define Q_V2_SETINFO 0x0A00 /* set info about quotas */ 79 #define Q_V2_SETGRACE 0x0B00 /* set inode and block grace */ 80 #define Q_V2_SETFLAGS 0x0C00 /* set flags for quota */ 81 #define Q_V2_GETQUOTA 0x0D00 /* get limits and usage */ 82 #define Q_V2_SETQUOTA 0x0E00 /* set limits and usage */ 83 #define Q_V2_SETUSE 0x0F00 /* set usage */ 84 #define Q_V2_GETSTATS 0x1100 /* get collected stats */ 85 86 #endif 87