From: Chris Mason Date: Thu, 17 Jul 2008 16:54:48 +0000 (-0400) Subject: Btrfs: Force caching of metadata block groups on mount to avoid deadlock X-Git-Tag: v2.6.29-rc1~27^2~9^2~55^2~56^2~30^2~120 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=54641bd17db9fbfc13c7b1d4ee0dd2713bf3e076;p=karo-tx-linux.git Btrfs: Force caching of metadata block groups on mount to avoid deadlock This is a temporary change to avoid deadlocks until the extent tree locking is fixed up. Signed-off-by: Chris Mason --- diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 4036c62b6671..be2aef1cb7ae 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -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;