Whamcloud - gitweb
LU-477 allocate memory for s_group_desc and s_group_info by vmalloc()
authorYu Jian <yujian@whamcloud.com>
Thu, 14 Jul 2011 06:32:14 +0000 (14:32 +0800)
committerOleg Drokin <green@whamcloud.com>
Thu, 21 Jul 2011 16:58:11 +0000 (12:58 -0400)
commit0081295f9a0095e52aaa3c39d72172be61d93de6
treee8bb8b1ebf1e88971e23abe29ea0b707c791e2e8
parentc2751b31e55518d1791cd5b87adc842f4fbbee83
LU-477 allocate memory for s_group_desc and s_group_info by vmalloc()

Add the patch to the RHEL6 ldiskfs patch series.

Large kmalloc() for sbi->s_group_desc and sbi->s_group_info can fail
for large filesystems, which will cause the "not enough memory" error
while mounting. This patch makes it fall back to vmalloc() if the
kmalloc() failed, as what was done for sbi->s_flex_groups.

To avoid colliding with an valid on-disk inode number, EXT4_BAD_INO
is used as the number of the buddy cache inode.

The patch also incorporates the following upstream kernel fix:

commit 32a9bb57d7c1fd04ae0f72b8f671501f000a0e9f
ext4: fix missing iput of root inode for some mount error paths
https://bugzilla.kernel.org/show_bug.cgi?id=26752

Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: Ia263c90759e96710702e4afff3ba19e77455386f
Reviewed-on: http://review.whamcloud.com/1095
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
ldiskfs/kernel_patches/patches/ext4-vmalloc-rhel6.patch [new file with mode: 0644]
ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel6.series