summaryrefslogtreecommitdiff
path: root/fs/btrfs/zstd.c
diff options
context:
space:
mode:
authorJosef Bacik <josef@toxicpanda.com>2019-09-24 16:50:44 -0400
committerDavid Sterba <dsterba@suse.com>2019-11-18 12:46:56 +0100
commita60adce85f4bb5c1ef8ffcebadd702cafa2f3696 (patch)
tree54fe63aebf84ad314bd2da4704fb418694d0d2a9 /fs/btrfs/zstd.c
parent3797136b626ad4b6582223660c041efdea8f26b2 (diff)
btrfs: use btrfs_block_group_cache_done in update_block_group
When free'ing extents in a block group we check to see if the block group is not cached, and then cache it if we need to. However we'll just carry on as long as we're loading the cache. This is problematic because we are dirtying the block group here. If we are fast enough we could do a transaction commit and clear the free space cache while we're still loading the space cache in another thread. This truncates the free space inode, which will keep it from loading the space cache. Fix this by using the btrfs_block_group_cache_done helper so that we try to load the space cache unconditionally here, which will result in the caller waiting for the fast caching to complete and keep us from truncating the free space inode. CC: stable@vger.kernel.org # 4.4+ Signed-off-by: Josef Bacik <josef@toxicpanda.com> Reviewed-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/zstd.c')
0 files changed, 0 insertions, 0 deletions