summaryrefslogtreecommitdiff
path: root/fs/hpfs
diff options
context:
space:
mode:
authorLukas Czerner <lczerner@redhat.com>2011-05-24 22:16:27 (GMT)
committerTheodore Ts'o <tytso@mit.edu>2011-05-24 22:16:27 (GMT)
commit78944086663e6c1b03f3d60bf7610128149be5fc (patch)
treefac4b6257258ffc15b59c8d42b6c569948daaed2 /fs/hpfs
parentc867516de5256e9cfba2ec5847fa27e0f0ddd2c5 (diff)
downloadlinux-78944086663e6c1b03f3d60bf7610128149be5fc.tar.xz
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 'fs/hpfs')
0 files changed, 0 insertions, 0 deletions