aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/ext4.h
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2013-06-04 13:01:11 -0400
committerTheodore Ts'o <tytso@mit.edu>2013-06-04 13:01:11 -0400
commitfffb273997cc52f255bde5f18e7f6b4686c914fb (patch)
tree7a5e338c8b2d0a7a3e1d6ac565b157471cb2ca54 /fs/ext4/ext4.h
parentfa55a0ed0386e1fcbb8a229a06a5c70477d0d6e5 (diff)
ext4: better estimate credits needed for ext4_da_writepages()
We limit the number of blocks written in a single loop of ext4_da_writepages() to 64 when inode uses indirect blocks. That is unnecessary as credit estimates for mapping logically continguous run of blocks is rather low even for inode with indirect blocks. So just lift this limitation and properly calculate the number of necessary credits. This better credit estimate will also later allow us to always write at least a single page in one iteration. Reviewed-by: Zheng Liu <wenqing.lz@taobao.com> Signed-off-by: Jan Kara <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, 1 insertions, 2 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 25e261da871f..2ebfcde5a156 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -2596,8 +2596,7 @@ struct ext4_extent;
2596 2596
2597extern int ext4_ext_tree_init(handle_t *handle, struct inode *); 2597extern int ext4_ext_tree_init(handle_t *handle, struct inode *);
2598extern int ext4_ext_writepage_trans_blocks(struct inode *, int); 2598extern int ext4_ext_writepage_trans_blocks(struct inode *, int);
2599extern int ext4_ext_index_trans_blocks(struct inode *inode, int nrblocks, 2599extern int ext4_ext_index_trans_blocks(struct inode *inode, int extents);
2600 int chunk);
2601extern int ext4_ext_map_blocks(handle_t *handle, struct inode *inode, 2600extern int ext4_ext_map_blocks(handle_t *handle, struct inode *inode,
2602 struct ext4_map_blocks *map, int flags); 2601 struct ext4_map_blocks *map, int flags);
2603extern void ext4_ext_truncate(handle_t *, struct inode *); 2602extern void ext4_ext_truncate(handle_t *, struct inode *);