]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: use commit root when loading free space cache
authorJosef Bacik <josef@redhat.com>
Thu, 12 Apr 2012 20:03:57 +0000 (16:03 -0400)
committerChris Mason <chris.mason@oracle.com>
Fri, 13 Apr 2012 00:54:01 +0000 (20:54 -0400)
commitda797f1c37c36e734a2c40993e8c4ad8cce26587
tree12bcb989f0e210f25770a72441eb8b947fd2fad3
parent1d84a884a5bd947ddbfe9a375577c77a7a03e575
Btrfs: use commit root when loading free space cache

A user reported that booting his box up with btrfs root on 3.4 was way
slower than on 3.3 because I removed the ideal caching code.  It turns out
that we don't load the free space cache if we're in a commit for deadlock
reasons, but since we're reading the cache and it hasn't changed yet we are
safe reading the inode and free space item from the commit root, so do that
and remove all of the deadlock checks so we don't unnecessarily skip loading
the free space cache.  The user reported this fixed the slowness.  Thanks,

Tested-by: Calvin Walton <calvin.walton@kepstin.ca>
Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/extent-tree.c
fs/btrfs/free-space-cache.c