summaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorJosef Bacik <josef@redhat.com>2011-04-01 14:55:00 +0000
committerChris Mason <chris.mason@oracle.com>2011-04-05 01:20:24 -0400
commit43be21462d8c263e2449b52b23326232fd710bee (patch)
tree096a8cf240ffa7aa83625245ccdba08970e46612 /samples
parent08fe4db170b4193603d9d31f40ebaf652d07ac9c (diff)
downloadlinux-3.10-43be21462d8c263e2449b52b23326232fd710bee.tar.gz
linux-3.10-43be21462d8c263e2449b52b23326232fd710bee.tar.bz2
linux-3.10-43be21462d8c263e2449b52b23326232fd710bee.zip
Btrfs: fix free space cache when there are pinned extents and clusters V2
I noticed a huge problem with the free space cache that was presenting as an early ENOSPC. Turns out when writing the free space cache out I forgot to take into account pinned extents and more importantly clusters. This would result in us leaking free space everytime we unmounted the filesystem and remounted it. I fix this by making sure to check and see if the current block group has a cluster and writing out any entries that are in the cluster to the cache, as well as writing any pinned extents we currently have to the cache since those will be available for us to use the next time the fs mounts. This patch also adds a check to the end of load_free_space_cache to make sure we got the right amount of free space cache, and if not make sure to clear the cache and re-cache the old fashioned way. Signed-off-by: Josef Bacik <josef@redhat.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'samples')
0 files changed, 0 insertions, 0 deletions