]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: grow the s_flex_groups array as needed when resizing
authorTheodore Ts'o <tytso@mit.edu>
Wed, 5 Sep 2012 05:29:50 +0000 (01:29 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 5 Sep 2012 05:29:50 +0000 (01:29 -0400)
commit447ade03fa808b43cd5be9e89f80cee414826383
tree0236d1dfb77e794b1628b723f21b3c83383e0475
parent02dd7dbe1eec35b1cdcb30f9ebc6230153a29970
ext4: grow the s_flex_groups array as needed when resizing

Previously, we allocated the s_flex_groups array to the maximum size
that the file system could be resized.  There was two problems with
this approach.  First, it wasted memory in the common case where the
file system was not resized.  Secondly, once we start allowing online
resizing using the meta_bg scheme, there is no maximum size that the
file system can be resized.  So instead, we need to grow the
s_flex_groups at inline resize time.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/ext4.h
fs/ext4/resize.c
fs/ext4/super.c