From: Theodore Ts'o Date: Tue, 28 Apr 2009 02:48:48 +0000 (-0400) Subject: ext4: Fallback to vmalloc if kmalloc can't allocate s_flex_groups array X-Git-Tag: v2.6.31-rc1~396^2~45 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c5ca7c7636fa689a9746b6032f83aa7fffec31c6;p=pandora-kernel.git ext4: Fallback to vmalloc if kmalloc can't allocate s_flex_groups array For very large filesystems, the s_flex_groups array can get quite big. For example, a filesystem that can be resized up to 16TB will have 8192 flex groups (assuming the default flex_bg size of 16), so the array is 96k, which is *very* marginal for kmalloc(). On the other hand, a 160GB filesystem without the resize_inode feature will only require 960 bytes. So we try to allocate the array first using kmalloc(), and if that fails, we'll try to use vmalloc() instead. Signed-off-by: "Theodore Ts'o" --- Reading git-diff-tree failed