Re: [PATCH] ext4: ext4_trim_fs() load buddy only when it is needed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux