diff options
author | Mingming Cao <cmm@us.ibm.com> | 2009-01-22 18:13:05 +0100 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2009-03-26 02:18:34 +0100 |
commit | 60e58e0f30e723464c2a7d34b71b8675566c572d (patch) | |
tree | 2797ae1bccdad12d53c989a6dccea1c8ffd2bce3 /fs/ext4/ext4.h | |
parent | 643d00ccc311664188c8209bf8b596a30e139c3a (diff) | |
download | lwn-60e58e0f30e723464c2a7d34b71b8675566c572d.tar.gz lwn-60e58e0f30e723464c2a7d34b71b8675566c572d.zip |
ext4: quota reservation for delayed allocation
Uses quota reservation/claim/release to handle quota properly for delayed
allocation in the three steps: 1) quotas are reserved when data being copied
to cache when block allocation is defered 2) when new blocks are allocated.
reserved quotas are converted to the real allocated quota, 2) over-booked
quotas for metadata blocks are released back.
Signed-off-by: Mingming Cao <cmm@us.ibm.com>
Acked-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/ext4/ext4.h')
-rw-r--r-- | fs/ext4/ext4.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index b0c87dce66a3..6083bb38057b 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -20,6 +20,7 @@ #include <linux/blkdev.h> #include <linux/magic.h> #include <linux/jbd2.h> +#include <linux/quota.h> #include "ext4_i.h" /* @@ -1098,6 +1099,7 @@ extern int ext4_chunk_trans_blocks(struct inode *, int nrblocks); extern int ext4_block_truncate_page(handle_t *handle, struct address_space *mapping, loff_t from); extern int ext4_page_mkwrite(struct vm_area_struct *vma, struct page *page); +extern qsize_t ext4_get_reserved_space(struct inode *inode); /* ioctl.c */ extern long ext4_ioctl(struct file *, unsigned int, unsigned long); |