Skip to contentSkip to conversation

quota: Add quota claim and release reserved quota blocks operations

RFC PATCH Superseded Mingming Cao 1 participant 1 message Oct 30, 2008

Subsystems (2)

v1 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

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.

---
 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
Index: linux-2.6.28-rc2/include/linux/quota.h
===================================================================
@@ -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