diff options
Diffstat (limited to 'include/linux/quota.h')
-rw-r--r-- | include/linux/quota.h | 47 |
1 files changed, 45 insertions, 2 deletions
diff --git a/include/linux/quota.h b/include/linux/quota.h index 50978b781a19..097d7eb2441e 100644 --- a/include/linux/quota.h +++ b/include/linux/quota.h | |||
@@ -321,6 +321,49 @@ struct dquot_operations { | |||
321 | 321 | ||
322 | struct path; | 322 | struct path; |
323 | 323 | ||
324 | /* Structure for communicating via ->get_dqblk() & ->set_dqblk() */ | ||
325 | struct qc_dqblk { | ||
326 | int d_fieldmask; /* mask of fields to change in ->set_dqblk() */ | ||
327 | u64 d_spc_hardlimit; /* absolute limit on used space */ | ||
328 | u64 d_spc_softlimit; /* preferred limit on used space */ | ||
329 | u64 d_ino_hardlimit; /* maximum # allocated inodes */ | ||
330 | u64 d_ino_softlimit; /* preferred inode limit */ | ||
331 | u64 d_space; /* Space owned by the user */ | ||
332 | u64 d_ino_count; /* # inodes owned by the user */ | ||
333 | s64 d_ino_timer; /* zero if within inode limits */ | ||
334 | /* if not, we refuse service */ | ||
335 | s64 d_spc_timer; /* similar to above; for space */ | ||
336 | int d_ino_warns; /* # warnings issued wrt num inodes */ | ||
337 | int d_spc_warns; /* # warnings issued wrt used space */ | ||
338 | u64 d_rt_spc_hardlimit; /* absolute limit on realtime space */ | ||
339 | u64 d_rt_spc_softlimit; /* preferred limit on RT space */ | ||
340 | u64 d_rt_space; /* realtime space owned */ | ||
341 | s64 d_rt_spc_timer; /* similar to above; for RT space */ | ||
342 | int d_rt_spc_warns; /* # warnings issued wrt RT space */ | ||
343 | }; | ||
344 | |||
345 | /* Field specifiers for ->set_dqblk() in struct qc_dqblk */ | ||
346 | #define QC_INO_SOFT (1<<0) | ||
347 | #define QC_INO_HARD (1<<1) | ||
348 | #define QC_SPC_SOFT (1<<2) | ||
349 | #define QC_SPC_HARD (1<<3) | ||
350 | #define QC_RT_SPC_SOFT (1<<4) | ||
351 | #define QC_RT_SPC_HARD (1<<5) | ||
352 | #define QC_LIMIT_MASK (QC_INO_SOFT | QC_INO_HARD | QC_SPC_SOFT | QC_SPC_HARD | \ | ||
353 | QC_RT_SPC_SOFT | QC_RT_SPC_HARD) | ||
354 | #define QC_SPC_TIMER (1<<6) | ||
355 | #define QC_INO_TIMER (1<<7) | ||
356 | #define QC_RT_SPC_TIMER (1<<8) | ||
357 | #define QC_TIMER_MASK (QC_SPC_TIMER | QC_INO_TIMER | QC_RT_SPC_TIMER) | ||
358 | #define QC_SPC_WARNS (1<<9) | ||
359 | #define QC_INO_WARNS (1<<10) | ||
360 | #define QC_RT_SPC_WARNS (1<<11) | ||
361 | #define QC_WARNS_MASK (QC_SPC_WARNS | QC_INO_WARNS | QC_RT_SPC_WARNS) | ||
362 | #define QC_SPACE (1<<12) | ||
363 | #define QC_INO_COUNT (1<<13) | ||
364 | #define QC_RT_SPACE (1<<14) | ||
365 | #define QC_ACCT_MASK (QC_SPACE | QC_INO_COUNT | QC_RT_SPACE) | ||
366 | |||
324 | /* Operations handling requests from userspace */ | 367 | /* Operations handling requests from userspace */ |
325 | struct quotactl_ops { | 368 | struct quotactl_ops { |
326 | int (*quota_on)(struct super_block *, int, int, struct path *); | 369 | int (*quota_on)(struct super_block *, int, int, struct path *); |
@@ -329,8 +372,8 @@ struct quotactl_ops { | |||
329 | int (*quota_sync)(struct super_block *, int); | 372 | int (*quota_sync)(struct super_block *, int); |
330 | int (*get_info)(struct super_block *, int, struct if_dqinfo *); | 373 | int (*get_info)(struct super_block *, int, struct if_dqinfo *); |
331 | int (*set_info)(struct super_block *, int, struct if_dqinfo *); | 374 | int (*set_info)(struct super_block *, int, struct if_dqinfo *); |
332 | int (*get_dqblk)(struct super_block *, struct kqid, struct fs_disk_quota *); | 375 | int (*get_dqblk)(struct super_block *, struct kqid, struct qc_dqblk *); |
333 | int (*set_dqblk)(struct super_block *, struct kqid, struct fs_disk_quota *); | 376 | int (*set_dqblk)(struct super_block *, struct kqid, struct qc_dqblk *); |
334 | int (*get_xstate)(struct super_block *, struct fs_quota_stat *); | 377 | int (*get_xstate)(struct super_block *, struct fs_quota_stat *); |
335 | int (*set_xstate)(struct super_block *, unsigned int, int); | 378 | int (*set_xstate)(struct super_block *, unsigned int, int); |
336 | int (*get_xstatev)(struct super_block *, struct fs_quota_statv *); | 379 | int (*get_xstatev)(struct super_block *, struct fs_quota_statv *); |