quota: Add quota reservation claim and released 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 <cmm@us.ibm.com>
Signed-off-by: Jan Kara <jack@suse.cz>
This commit is contained in:
Mingming Cao
2009-01-13 16:43:14 +01:00
committed by Jan Kara
parent f18df22899
commit 740d9dcd94
3 changed files with 165 additions and 4 deletions

View File

@@ -311,6 +311,12 @@ struct dquot_operations {
int (*write_info) (struct super_block *, int); /* Write of quota "superblock" */
/* reserve quota for delayed block allocation */
int (*reserve_space) (struct inode *, qsize_t, int);
/* claim reserved quota for delayed alloc */
int (*claim_space) (struct inode *, qsize_t);
/* release rsved quota for delayed alloc */
void (*release_rsv) (struct inode *, qsize_t);
/* get reserved quota for delayed alloc */
qsize_t (*get_reserved_space) (struct inode *);
};
/* Operations handling requests from userspace */