Index: linux-2.6.24-rc1/fs/ext4/mballoc.c =================================================================== --- linux-2.6.24-rc1.orig/fs/ext4/mballoc.c 2007-10-27 10:29:17.000000000 +0400 +++ linux-2.6.24-rc1/fs/ext4/mballoc.c 2007-11-04 21:30:20.000000000 +0300 @@ -1553,7 +1553,8 @@ static void ext4_mb_measure_extent(struc /* if the request is satisfied, then we try to find * an extent that still satisfy the request, but is * smaller than previous one */ - *bex = *ex; + if (ex->fe_len < bex->fe_len) + *bex = *ex; } ext4_mb_check_limits(ac, e4b, 0); @@ -2311,6 +2312,11 @@ static void ext4_mb_store_history(struct h.orig = ac->ac_o_ex; h.result = ac->ac_b_ex; h.flags = ac->ac_flags; + h.found = ac->ac_found; + h.groups = ac->ac_groups_scanned; + h.cr = ac->ac_criteria; + h.tail = ac->ac_tail; + h.buddy = ac->ac_buddy; h.merged = 0; if (ac->ac_op == EXT4_MB_HISTORY_ALLOC) { if (ac->ac_g_ex.fe_start == ac->ac_b_ex.fe_start &&