![]() |
|
|||
0001 /* SPDX-License-Identifier: GPL-2.0 */ 0002 /* 0003 * Definitions of structures for vfsv0 quota format 0004 */ 0005 0006 #ifndef _LINUX_QUOTAIO_V2_H 0007 #define _LINUX_QUOTAIO_V2_H 0008 0009 #include <linux/types.h> 0010 #include <linux/quota.h> 0011 0012 /* 0013 * Definitions of magics and versions of current quota files 0014 */ 0015 #define V2_INITQMAGICS {\ 0016 0xd9c01f11, /* USRQUOTA */\ 0017 0xd9c01927, /* GRPQUOTA */\ 0018 0xd9c03f14, /* PRJQUOTA */\ 0019 } 0020 0021 #define V2_INITQVERSIONS {\ 0022 1, /* USRQUOTA */\ 0023 1, /* GRPQUOTA */\ 0024 1, /* PRJQUOTA */\ 0025 } 0026 0027 /* First generic header */ 0028 struct v2_disk_dqheader { 0029 __le32 dqh_magic; /* Magic number identifying file */ 0030 __le32 dqh_version; /* File version */ 0031 }; 0032 0033 /* 0034 * The following structure defines the format of the disk quota file 0035 * (as it appears on disk) - the file is a radix tree whose leaves point 0036 * to blocks of these structures. 0037 */ 0038 struct v2r0_disk_dqblk { 0039 __le32 dqb_id; /* id this quota applies to */ 0040 __le32 dqb_ihardlimit; /* absolute limit on allocated inodes */ 0041 __le32 dqb_isoftlimit; /* preferred inode limit */ 0042 __le32 dqb_curinodes; /* current # allocated inodes */ 0043 __le32 dqb_bhardlimit; /* absolute limit on disk space (in QUOTABLOCK_SIZE) */ 0044 __le32 dqb_bsoftlimit; /* preferred limit on disk space (in QUOTABLOCK_SIZE) */ 0045 __le64 dqb_curspace; /* current space occupied (in bytes) */ 0046 __le64 dqb_btime; /* time limit for excessive disk use */ 0047 __le64 dqb_itime; /* time limit for excessive inode use */ 0048 }; 0049 0050 struct v2r1_disk_dqblk { 0051 __le32 dqb_id; /* id this quota applies to */ 0052 __le32 dqb_pad; 0053 __le64 dqb_ihardlimit; /* absolute limit on allocated inodes */ 0054 __le64 dqb_isoftlimit; /* preferred inode limit */ 0055 __le64 dqb_curinodes; /* current # allocated inodes */ 0056 __le64 dqb_bhardlimit; /* absolute limit on disk space (in QUOTABLOCK_SIZE) */ 0057 __le64 dqb_bsoftlimit; /* preferred limit on disk space (in QUOTABLOCK_SIZE) */ 0058 __le64 dqb_curspace; /* current space occupied (in bytes) */ 0059 __le64 dqb_btime; /* time limit for excessive disk use */ 0060 __le64 dqb_itime; /* time limit for excessive inode use */ 0061 }; 0062 0063 /* Header with type and version specific information */ 0064 struct v2_disk_dqinfo { 0065 __le32 dqi_bgrace; /* Time before block soft limit becomes hard limit */ 0066 __le32 dqi_igrace; /* Time before inode soft limit becomes hard limit */ 0067 __le32 dqi_flags; /* Flags for quotafile (DQF_*) */ 0068 __le32 dqi_blocks; /* Number of blocks in file */ 0069 __le32 dqi_free_blk; /* Number of first free block in the list */ 0070 __le32 dqi_free_entry; /* Number of block with at least one free entry */ 0071 }; 0072 0073 #define V2_DQINFOOFF sizeof(struct v2_disk_dqheader) /* Offset of info header in file */ 0074 #define V2_DQBLKSIZE_BITS 10 /* Size of leaf block in tree */ 0075 0076 #endif /* _LINUX_QUOTAIO_V2_H */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |