diff options
author | Josef Bacik <josef@redhat.com> | 2012-05-14 16:06:40 +0200 |
---|---|---|
committer | Josef Bacik <josef@redhat.com> | 2012-05-30 16:23:36 +0200 |
commit | cd023e7b17fe86c530475da210b3348421c40e5f (patch) | |
tree | b80cf40b7ad18af59ef43602b673fe1c7d371232 /kernel/extable.c | |
parent | Btrfs: do not do balance in readonly mode (diff) | |
download | linux-cd023e7b17fe86c530475da210b3348421c40e5f.tar.xz linux-cd023e7b17fe86c530475da210b3348421c40e5f.zip |
Btrfs: merge contigous regions when loading free space cache
When we write out the free space cache we will write out everything that is
in our in memory tree, and then we will just walk the pinned extents tree
and write anything we see there. The problem with this is that during
normal operations the pinned extents will be merged back into the free space
tree normally, and then we can allocate space from the merged areas and
commit them to the tree log. If we crash and replay the tree log we will
crash again because the tree log will try to free up space from what looks
like 2 seperate but contiguous entries, since one entry is from the original
free space cache and the other was a pinned extent that was merged back. To
fix this we just need to walk the free space tree after we load it and merge
contiguous entries back together. This will keep the tree log stuff from
breaking and it will make the allocator behave more nicely. Thanks,
Signed-off-by: Josef Bacik <josef@redhat.com>
Diffstat (limited to 'kernel/extable.c')
0 files changed, 0 insertions, 0 deletions