1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */ 2884d179dSJan Kara #ifndef _LINUX_QUOTAIO_V1_H 3884d179dSJan Kara #define _LINUX_QUOTAIO_V1_H 4884d179dSJan Kara 5884d179dSJan Kara #include <linux/types.h> 6884d179dSJan Kara 7884d179dSJan Kara /* 8884d179dSJan Kara * The following constants define the amount of time given a user 9884d179dSJan Kara * before the soft limits are treated as hard limits (usually resulting 10884d179dSJan Kara * in an allocation failure). The timer is started when the user crosses 11884d179dSJan Kara * their soft limit, it is reset when they go below their soft limit. 12884d179dSJan Kara */ 13884d179dSJan Kara #define MAX_IQ_TIME 604800 /* (7*24*60*60) 1 week */ 14884d179dSJan Kara #define MAX_DQ_TIME 604800 /* (7*24*60*60) 1 week */ 15884d179dSJan Kara 16884d179dSJan Kara /* 17884d179dSJan Kara * The following structure defines the format of the disk quota file 18884d179dSJan Kara * (as it appears on disk) - the file is an array of these structures 19884d179dSJan Kara * indexed by user or group number. 20884d179dSJan Kara */ 21884d179dSJan Kara struct v1_disk_dqblk { 22884d179dSJan Kara __u32 dqb_bhardlimit; /* absolute limit on disk blks alloc */ 23884d179dSJan Kara __u32 dqb_bsoftlimit; /* preferred limit on disk blks */ 24884d179dSJan Kara __u32 dqb_curblocks; /* current block count */ 25884d179dSJan Kara __u32 dqb_ihardlimit; /* absolute limit on allocated inodes */ 26884d179dSJan Kara __u32 dqb_isoftlimit; /* preferred inode limit */ 27884d179dSJan Kara __u32 dqb_curinodes; /* current # allocated inodes */ 28*1ead083aSArnd Bergmann 29*1ead083aSArnd Bergmann /* below fields differ in length on 32-bit vs 64-bit architectures */ 30*1ead083aSArnd Bergmann unsigned long dqb_btime; /* time limit for excessive disk use */ 31*1ead083aSArnd Bergmann unsigned long dqb_itime; /* time limit for excessive inode use */ 32884d179dSJan Kara }; 33884d179dSJan Kara 34884d179dSJan Kara #define v1_dqoff(UID) ((loff_t)((UID) * sizeof (struct v1_disk_dqblk))) 35884d179dSJan Kara 36884d179dSJan Kara #endif /* _LINUX_QUOTAIO_V1_H */ 37