summaryrefslogtreecommitdiff
path: root/fs/ext4/ext4.h
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2019-11-05 19:44:29 +0300
committerTheodore Ts'o <tytso@mit.edu>2019-11-06 00:00:49 +0300
commit83448bdfb59731c2f54784ed3f4a93ff95be6e7e (patch)
tree1565589f99ab6ca22e94e2167c21b94934ab8ce3 /fs/ext4/ext4.h
parentd090707edab59cb07047d6d7e138ffcc3bdc42be (diff)
downloadlinux-83448bdfb59731c2f54784ed3f4a93ff95be6e7e.tar.xz
ext4: Reserve revoke credits for freed blocks
So far we have reserved only relatively high fixed amount of revoke credits for each transaction. We over-reserved by large amount for most cases but when freeing large directories or files with data journalling, the fixed amount is not enough. In fact the worst case estimate is inconveniently large (maximum extent size) for freeing of one extent. We fix this by doing proper estimate of the amount of blocks that need to be revoked when removing blocks from the inode due to truncate or hole punching and otherwise reserve just a small amount of revoke credits for each transaction to accommodate freeing of xattrs block or so. Signed-off-by: Jan Kara <jack@suse.cz> Link: https://lore.kernel.org/r/20191105164437.32602-23-jack@suse.cz Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/ext4.h')
-rw-r--r--fs/ext4/ext4.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 67a6fcc11182..a606d17a80b0 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -3296,7 +3296,8 @@ extern int ext4_swap_extents(handle_t *handle, struct inode *inode1,
int mark_unwritten,int *err);
extern int ext4_clu_mapped(struct inode *inode, ext4_lblk_t lclu);
extern int ext4_datasem_ensure_credits(handle_t *handle, struct inode *inode,
- int check_cred, int restart_cred);
+ int check_cred, int restart_cred,
+ int revoke_cred);
/* move_extent.c */