]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: make the zero-out chunk size tunable
authorZheng Liu <wenqing.lz@taobao.com>
Fri, 17 Aug 2012 13:54:17 +0000 (09:54 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 17 Aug 2012 13:54:17 +0000 (09:54 -0400)
commiteb7233fd996f5eed5d2b0d20880fbc84edaa957c
tree525f256d46cfac4be0b0acd90cc2bad5fcdb1b77
parentc80a003e3b7a4ad0b7c745c9464c0c3425982528
ext4: make the zero-out chunk size tunable

Currently in ext4 the length of zero-out chunk is set to 7 file system
blocks.  But if an inode has uninitailized extents from using
fallocate to preallocate space, and the workload issues many random
writes, this can cause a fragmented extent tree that will
unnecessarily grow the extent tree.

So create a new sysfs tunable, extent_max_zeroout_kb, which controls
the maximum size where blocks will be zeroed out instead of creating a
new uninitialized extent.  The default of this has been sent to 32kb.

CC: Zach Brown <zab@zabbo.net>
CC: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Documentation/ABI/testing/sysfs-fs-ext4
fs/ext4/ext4.h
fs/ext4/extents.c
fs/ext4/super.c