]> git.baikalelectronics.ru Git - kernel.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)
commit3e0d308545ac1fa89b83bd3c06d242a7ffa07bb2
treed59bdf911b0a360f87308c1499a320f1b6f7be06
parent831b26d479b716f1164e827b443dbc2f02f7053e
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