]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ext4: use s_extent_max_zeroout_kb value as number of kb
authorLukas Czerner <lczerner@redhat.com>
Tue, 12 Mar 2013 16:40:04 +0000 (12:40 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Mar 2013 19:18:00 +0000 (12:18 -0700)
commitee0906fc8da3447d168a73570754a160ecbe399b
tree99ab521c2150e186992c8e2183d55ed1ecc7ed90
parent229cf88d53fb74a36fcc7307048666081b283f49
ext4: use s_extent_max_zeroout_kb value as number of kb

commit 4f42f80a8f08d4c3f52c4267361241885d5dee3a upstream.

Currently when converting extent to initialized, we have to decide
whether to zeroout part/all of the uninitialized extent in order to
avoid extent tree growing rapidly.

The decision is made by comparing the size of the extent with the
configurable value s_extent_max_zeroout_kb which is in kibibytes units.

However when converting it to number of blocks we currently use it as it
was in bytes. This is obviously bug and it will result in ext4 _never_
zeroout extents, but rather always split and convert parts to
initialized while leaving the rest uninitialized in default setting.

Fix this by using s_extent_max_zeroout_kb as kibibytes.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/extents.c