On Mon, Apr 18, 2011 at 06:32:31PM +0200, Lukas Czerner wrote: > Currently we are loading buddy ext4_mb_load_buddy() for every block > group we are going through in ext4_trim_fs() in many cases just to find > out that there is not enough space to be bothered with. As Amir Goldstein > suggested we can use bb_free information directly from ext4_group_info. > > This commit removes ext4_mb_load_buddy() from ext4_trim_fs() and rather > get the ext4_group_info via ext4_get_group_info() and use the bb_free > information directly from that. This avoids unnecessary call to load > buddy in the case the group does not have enough free space to trim. > Loading buddy is now moved to ext4_trim_all_free(). > > Tested by me with xfstests 251. > > Signed-off-by: Lukas Czerner <lczerner@xxxxxxxxxx> I just added this patch to the ext4 tree. Apologies for not noticing it earlier. I had to make a few adjustments to make the patch apply, but nothing major. - Ted -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html