]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: cleanup ext4_ext_grow_indepth code
authorDmitry Monakhov <dmonakhov@openvz.org>
Sat, 22 Oct 2011 05:26:05 +0000 (01:26 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 22 Oct 2011 05:26:05 +0000 (01:26 -0400)
commitc7b83f25a44cbe47fd7dcc5e4223de3b87a25826
treef1b30614ea4c4e991abb279c9d7d181e207c7148
parentde2da75608049bc5551fc12121944f492ab2b935
ext4: cleanup ext4_ext_grow_indepth code

Currently code make an impression what grow procedure is very complicated
and some mythical paths, blocks are involved. But in fact grow in depth
it relatively simple procedure:
 1) Just create new meta block and copy root data to that block.
 2) Convert root from extent to index if old depth == 0
 3) Update root block pointer

This patch does:
 - Reorganize code to make it more self explanatory
 - Do not pass path parameter to new_meta_block() in order to
   provoke allocation from inode's group because top-level block
   should site closer to it's inode, but not to leaf data block.

   [ This happens anyway, due to logic in mballoc; we should drop
     the path parameter from new_meta_block() entirely.  -- tytso ]

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/extents.c