]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: better estimate credits needed for ext4_da_writepages()
authorJan Kara <jack@suse.cz>
Tue, 4 Jun 2013 17:01:11 +0000 (13:01 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 4 Jun 2013 17:01:11 +0000 (13:01 -0400)
commit74c2c558e068095dc8e210dcc0ad620c8fb0a3e9
tree7a5e338c8b2d0a7a3e1d6ac565b157471cb2ca54
parent5002697fe0914320bb591297265109ef446039e2
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>
fs/ext4/ext4.h
fs/ext4/extents.c
fs/ext4/inode.c