ext4: add action of moving index in ext4_ext_rm_idx for Punch Hole
authorRobin Dong <sanbai@taobao.com>
Thu, 28 Jul 2011 01:29:33 +0000 (21:29 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 28 Jul 2011 01:29:33 +0000 (21:29 -0400)
commit0e1147b001793593624e80b3c0a1790822b6baca
treeb43cf0a3f8cb4733386867c4b06d92eb0025f04a
parent668f4dc5593327fadc95b33189c375f7178ef88e
ext4: add action of moving index in ext4_ext_rm_idx for Punch Hole

The old function ext4_ext_rm_idx is used only for truncate case
because it just remove last index in extent-index-block. When punching
hole, it usually needed to remove "middle" index, therefore we must
move indexes which after it forward.

(I create a file with 1 depth extent tree and punch hole in the middle
of it, the last index in index-block strangly gone, so I find out this
bug)

Signed-off-by: Robin Dong <sanbai@taobao.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/extents.c