quota: Add quota claim and release reserved quota blocks operations
RFC PATCH 2/3 quota: Add quota claim and release reserved quota blocks operations
quota: Add quota claim and release reserved quota blocks operations
Reserved quota will be claimed at the block allocation time. Over-booked quota could be returned back with the release callback function.
Signed-off-by Mingming Cao <[email protected]>
--- fs/dquot.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++ include/linux/quota.h | 2 + include/linux/quotaops.h | 47 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 105 insertions(+)
include/linux/quota.h +2 -0
@@ -293,6 +293,8 @@ struct dquot_operations {int (*mark_dirty) (struct dquot *);/* Dquot is marked dirty */ int (*write_info) (struct super_block *,int );/* Write of quota "superblock" */ int (*reserve_space) (struct inode *,qsize_t ,int );/* reserve quota for delayed block allocation */ +int (*claim_space) (struct inode *,qsize_t );/* claim reserved quota for delayed block allocation */ +void (*release_rsv) (struct inode *,qsize_t );/* release reserved quota for delayed block allocation */ };/* Operations handling requests from userspace */
include/linux/quotaops.h +53 -0
83 lines not on this page · raw message
fs/dquot.c +84 -1
103 lines not on this page · raw message