diff options
author | Lukas Czerner <lczerner@redhat.com> | 2011-05-24 18:16:27 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2011-05-24 18:16:27 -0400 |
commit | 78944086663e6c1b03f3d60bf7610128149be5fc (patch) | |
tree | fac4b6257258ffc15b59c8d42b6c569948daaed2 /init/Kconfig | |
parent | c867516de5256e9cfba2ec5847fa27e0f0ddd2c5 (diff) | |
download | op-kernel-dev-78944086663e6c1b03f3d60bf7610128149be5fc.zip op-kernel-dev-78944086663e6c1b03f3d60bf7610128149be5fc.tar.gz |
ext4: only load buddy bitmap in ext4_trim_fs() when it is needed
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@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'init/Kconfig')
0 files changed, 0 insertions, 0 deletions