]> git.karo-electronics.de Git - karo-tx-linux.git/commit
Btrfs: cache bitmaps when searching for a cluster
authorJosef Bacik <josef@redhat.com>
Wed, 25 May 2011 17:03:16 +0000 (13:03 -0400)
committerJosef Bacik <josef@redhat.com>
Wed, 8 Jun 2011 19:08:28 +0000 (15:08 -0400)
commit86d4a77ba3dc4ace238a0556541a41df2bd71d49
treed59bdf911b0a360f87308c1499a320f1b6f7be06
parentaa0467d8d2a00e75b2bb6a56a4ee6d70c5d1928f
Btrfs: cache bitmaps when searching for a cluster

If we are looking for a cluster in a particularly sparse or fragmented block
group, we will do a lot of looping through the free space tree looking for
various things, and if we need to look at bitmaps we will endup doing the whole
dance twice.  So instead add the bitmap entries to a temporary list so if we
have to do the bitmap search we can just look through the list of entries we've
found quickly instead of having to loop through the entire tree again.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
fs/btrfs/free-space-cache.c