]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: cache extent hole in extent status tree for ext4_da_map_blocks()
authorZheng Liu <wenqing.lz@taobao.com>
Tue, 25 Nov 2014 16:44:37 +0000 (11:44 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 25 Nov 2014 16:44:37 +0000 (11:44 -0500)
commit78a0758036ba099900f3008bed2d6741da4c83c3
tree4e03e95c516bab8be44e23861626f0c0f29a3958
parenteb3cd841dedab8f06fe1af69d6e6ae3667eebfac
ext4: cache extent hole in extent status tree for ext4_da_map_blocks()

Currently extent status tree doesn't cache extent hole when a write
looks up in extent tree to make sure whether a block has been allocated
or not.  In this case, we don't put extent hole in extent cache because
later this extent might be removed and a new delayed extent might be
added back.  But it will cause a defect when we do a lot of writes.  If
we don't put extent hole in extent cache, the following writes also need
to access extent tree to look at whether or not a block has been
allocated.  It brings a cache miss.  This commit fixes this defect.
Also if the inode doesn't have any extent, this extent hole will be
cached as well.

Cc: Andreas Dilger <adilger.kernel@dilger.ca>
Signed-off-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
include/trace/events/ext4.h