Currently all quota flags were defined just in kernel-private headers. Export flags readable / writeable from userspace to userspace via include/uapi/linux/quota.h.
Showing the changes to include/uapi/linux (1 of 4 files). Show all
Unified · Split
| @@ -126,10 +126,22 @@ struct if_dqblk { · 125 unmodified lines | ||
| 126 | 126 | #define IIF_FLAGS 4 |
| 127 | 127 | #define IIF_ALL (IIF_BGRACE | IIF_IGRACE | IIF_FLAGS) |
| 128 | 128 | |
| 129 | +enum { | |
| 130 | + DQF_ROOT_SQUASH_B = 0, | |
| 131 | + DQF_SYS_FILE_B = 16, | |
| 132 | + /* Kernel internal flags invisible to userspace */ | |
| 133 | + DQF_PRIVATE | |
| 134 | +}; | |
| 135 | + | |
| 136 | +/* Root squash enabled (for v1 quota format) */ | |
| 137 | +#define DQF_ROOT_SQUASH (1 << DQF_ROOT_SQUASH_B) | |
| 138 | +/* Quota stored in a system file */ | |
| 139 | +#define DQF_SYS_FILE (1 << DQF_SYS_FILE_B) | |
| 140 | + | |
| 129 | 141 | struct if_dqinfo { |
| 130 | 142 | __u64 dqi_bgrace; |
| 131 | 143 | __u64 dqi_igrace; |
| 132 | − __u32 dqi_flags; | |
| 144 | + __u32 dqi_flags; /* DFQ_* */ | |
| 133 | 145 | __u32 dqi_valid; |
| 134 | 146 | }; |
| 135 | 147 | |