From: Robin Dong Date: Wed, 26 Oct 2011 09:14:27 +0000 (-0400) Subject: ext4: use stream-alloc when mb_group_prealloc set to zero X-Git-Tag: v3.2-rc1~85^2~29 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ebbe027797f67d34708ccfabdb129886d549f9ce;p=pandora-kernel.git ext4: use stream-alloc when mb_group_prealloc set to zero The kernel will crash on ext4_mb_mark_diskspace_used: BUG_ON(ac->ac_b_ex.fe_len <= 0); after we set /sys/fs/ext4/sda/mb_group_prealloc to zero and create new files in an ext4 filesystem. The reason is: ac_b_ex.fe_len also set to zero(mb_group_prealloc) in ext4_mb_normalize_group_request because the ac_flags contains EXT4_MB_HINT_GROUP_ALLOC. I think when someone set mb_group_prealloc to zero, it means DO NOT USE GROUP PREALLOCATION, so we should set alloc-strategy to STREAM in this case. Signed-off-by: Robin Dong Signed-off-by: "Theodore Ts'o" --- Reading git-diff-tree failed