Skip to content

Commit

Permalink
Btrfs: Force caching of metadata block groups on mount to avoid deadlock
Browse files Browse the repository at this point in the history
This is a temporary change to avoid deadlocks until the extent tree locking
is fixed up.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
  • Loading branch information
Chris Mason committed Sep 25, 2008
1 parent 0bd40a7 commit 54641bd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions fs/btrfs/extent-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -3333,6 +3333,11 @@ int btrfs_read_block_groups(struct btrfs_root *root)
set_state_private(block_group_cache, found_key.objectid,
(unsigned long)cache);

/* hack for now */
if (cache->flags & BTRFS_BLOCK_GROUP_METADATA) {
cache_block_group(root->fs_info->extent_root,
cache);
}
if (key.objectid >=
btrfs_super_total_bytes(&info->super_copy))
break;
Expand Down

0 comments on commit 54641bd

Please sign in to comment.