]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ext4: lookup block mapping in extent status tree
authorZheng Liu <wenqing.lz@taobao.com>
Mon, 18 Feb 2013 05:29:59 +0000 (00:29 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 18 Feb 2013 05:29:59 +0000 (00:29 -0500)
commit9359e4325a671ce0f8df0f43b33a363ff3c767e5
tree1acf74ef5583e52c9cc39243d29dc6340ee9ca29
parent3d9b96ff98a809ae87c6b86e3354e3191aefb0a3
ext4: lookup block mapping in extent status tree

After tracking all extent status, we already have a extent cache in
memory.  Every time we want to lookup a block mapping, we can first
try to lookup it in extent status tree to avoid a potential disk I/O.

A new function called ext4_es_lookup_extent is defined to finish this
work.  When we try to lookup a block mapping, we always call
ext4_map_blocks and/or ext4_da_map_blocks.  So in these functions we
first try to lookup a block mapping in extent status tree.

A new flag EXT4_GET_BLOCKS_NO_PUT_HOLE is used in ext4_da_map_blocks
in order not to put a hole into extent status tree because this hole
will be converted to delayed extent in the tree immediately.

Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: Jan kara <jack@suse.cz>
fs/ext4/ext4.h
fs/ext4/extents.c
fs/ext4/extents_status.c
fs/ext4/extents_status.h
fs/ext4/inode.c
include/trace/events/ext4.h