Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef _LINUX_QUOTAIO_V1_H
0003 #define _LINUX_QUOTAIO_V1_H
0004 
0005 #include <linux/types.h>
0006 
0007 /*
0008  * The following constants define the amount of time given a user
0009  * before the soft limits are treated as hard limits (usually resulting
0010  * in an allocation failure). The timer is started when the user crosses
0011  * their soft limit, it is reset when they go below their soft limit.
0012  */
0013 #define MAX_IQ_TIME  604800 /* (7*24*60*60) 1 week */
0014 #define MAX_DQ_TIME  604800 /* (7*24*60*60) 1 week */
0015 
0016 /*
0017  * The following structure defines the format of the disk quota file
0018  * (as it appears on disk) - the file is an array of these structures
0019  * indexed by user or group number.
0020  */
0021 struct v1_disk_dqblk {
0022     __u32 dqb_bhardlimit;   /* absolute limit on disk blks alloc */
0023     __u32 dqb_bsoftlimit;   /* preferred limit on disk blks */
0024     __u32 dqb_curblocks;    /* current block count */
0025     __u32 dqb_ihardlimit;   /* absolute limit on allocated inodes */
0026     __u32 dqb_isoftlimit;   /* preferred inode limit */
0027     __u32 dqb_curinodes;    /* current # allocated inodes */
0028 
0029     /* below fields differ in length on 32-bit vs 64-bit architectures */
0030     unsigned long dqb_btime; /* time limit for excessive disk use */
0031     unsigned long dqb_itime; /* time limit for excessive inode use */
0032 };
0033 
0034 #define v1_dqoff(UID)      ((loff_t)((UID) * sizeof (struct v1_disk_dqblk)))
0035 
0036 #endif  /* _LINUX_QUOTAIO_V1_H */