]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ext4: mballoc: don't replace the current preallocation group unnecessarily
authorColy Li <colyli@gmail.com>
Thu, 24 Feb 2011 19:10:05 +0000 (14:10 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 24 Feb 2011 19:10:05 +0000 (14:10 -0500)
commit5a54b2f199fdf19533f96c3e285b70c6729e1e4a
treebf5b23a197b71349076558d2d985848451194bab
parent58696f3ab2b23fd6519189875fafdb5d1281eb54
ext4: mballoc: don't replace the current preallocation group unnecessarily

In ext4_mb_check_group_pa(), the current preallocation space is
replaced with a new preallocation space when the two have the same
distance from the goal block.

This doesn't actually gain us anything, so change things so that the
function only switches to the new preallocation group if its distance
from the goal block is strictly smaller than the current preallocaiton
group's distance from the goal block.

Signed-off-by: Coly Li <bosong.ly@taobao.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/mballoc.c