Commit 24a70313 authored by Chris Mason's avatar Chris Mason

Btrfs: remove free-space-cache.c WARN during log replay

The log replay code only partially loads block groups, since
the block group caching code is able to detect and deal with
extents the logging code has pinned down.

While the logging code is pinning down block groups, there is
a bogus WARN_ON we're hitting if the code wasn't able to find
an extent in the cache.  This commit removes the warning because
it can happen any time there isn't a valid free space cache
for that block group.
Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
parent 4d479cf0
...@@ -1849,7 +1849,13 @@ int btrfs_remove_free_space(struct btrfs_block_group_cache *block_group, ...@@ -1849,7 +1849,13 @@ int btrfs_remove_free_space(struct btrfs_block_group_cache *block_group,
info = tree_search_offset(ctl, offset_to_bitmap(ctl, offset), info = tree_search_offset(ctl, offset_to_bitmap(ctl, offset),
1, 0); 1, 0);
if (!info) { if (!info) {
WARN_ON(1); /* the tree logging code might be calling us before we
* have fully loaded the free space rbtree for this
* block group. So it is possible the entry won't
* be in the rbtree yet at all. The caching code
* will make sure not to put it in the rbtree if
* the logging code has pinned it.
*/
goto out_lock; goto out_lock;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment