diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-11-27 18:45:45 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-11-27 18:45:45 -0500 |
commit | 80e0c505b22e64ab1787285b182a1e8395e53991 (patch) | |
tree | ea854bf26485574860ff0cc18245e4645ccc5d0d /fs/btrfs/volumes.c | |
parent | 7e4b9359f483fe270c176cc37aaad54d5d1b6a1c (diff) | |
parent | dba72cb30b6a4811038128c8a98b268d18ca60fe (diff) |
Merge branch 'for-linus-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs
Pull btrfs fixes from Chris Mason:
"This has Mark Fasheh's patches to fix quota accounting during subvol
deletion, which we've been working on for a while now. The patch is
pretty small but it's a key fix.
Otherwise it's a random assortment"
* 'for-linus-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
btrfs: fix balance range usage filters in 4.4-rc
btrfs: qgroup: account shared subtree during snapshot delete
Btrfs: use btrfs_get_fs_root in resolve_indirect_ref
btrfs: qgroup: fix quota disable during rescan
Btrfs: fix race between cleaner kthread and space cache writeout
Btrfs: fix scrub preventing unused block groups from being deleted
Btrfs: fix race between scrub and block group deletion
btrfs: fix rcu warning during device replace
btrfs: Continue replace when set_block_ro failed
btrfs: fix clashing number of the enhanced balance usage filter
Btrfs: fix the number of transaction units needed to remove a block group
Btrfs: use global reserve when deleting unused block group after ENOSPC
Btrfs: tests: checking for NULL instead of IS_ERR()
btrfs: fix signed overflows in btrfs_sync_file
Diffstat (limited to 'fs/btrfs/volumes.c')
-rw-r--r-- | fs/btrfs/volumes.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index a6df8fdc1312..456452206609 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c | |||
@@ -1973,8 +1973,7 @@ void btrfs_rm_dev_replace_remove_srcdev(struct btrfs_fs_info *fs_info, | |||
1973 | if (srcdev->writeable) { | 1973 | if (srcdev->writeable) { |
1974 | fs_devices->rw_devices--; | 1974 | fs_devices->rw_devices--; |
1975 | /* zero out the old super if it is writable */ | 1975 | /* zero out the old super if it is writable */ |
1976 | btrfs_scratch_superblocks(srcdev->bdev, | 1976 | btrfs_scratch_superblocks(srcdev->bdev, srcdev->name->str); |
1977 | rcu_str_deref(srcdev->name)); | ||
1978 | } | 1977 | } |
1979 | 1978 | ||
1980 | if (srcdev->bdev) | 1979 | if (srcdev->bdev) |
@@ -2024,8 +2023,7 @@ void btrfs_destroy_dev_replace_tgtdev(struct btrfs_fs_info *fs_info, | |||
2024 | btrfs_sysfs_rm_device_link(fs_info->fs_devices, tgtdev); | 2023 | btrfs_sysfs_rm_device_link(fs_info->fs_devices, tgtdev); |
2025 | 2024 | ||
2026 | if (tgtdev->bdev) { | 2025 | if (tgtdev->bdev) { |
2027 | btrfs_scratch_superblocks(tgtdev->bdev, | 2026 | btrfs_scratch_superblocks(tgtdev->bdev, tgtdev->name->str); |
2028 | rcu_str_deref(tgtdev->name)); | ||
2029 | fs_info->fs_devices->open_devices--; | 2027 | fs_info->fs_devices->open_devices--; |
2030 | } | 2028 | } |
2031 | fs_info->fs_devices->num_devices--; | 2029 | fs_info->fs_devices->num_devices--; |
@@ -2853,7 +2851,8 @@ static int btrfs_relocate_chunk(struct btrfs_root *root, u64 chunk_offset) | |||
2853 | if (ret) | 2851 | if (ret) |
2854 | return ret; | 2852 | return ret; |
2855 | 2853 | ||
2856 | trans = btrfs_start_transaction(root, 0); | 2854 | trans = btrfs_start_trans_remove_block_group(root->fs_info, |
2855 | chunk_offset); | ||
2857 | if (IS_ERR(trans)) { | 2856 | if (IS_ERR(trans)) { |
2858 | ret = PTR_ERR(trans); | 2857 | ret = PTR_ERR(trans); |
2859 | btrfs_std_error(root->fs_info, ret, NULL); | 2858 | btrfs_std_error(root->fs_info, ret, NULL); |
@@ -3123,7 +3122,7 @@ static int chunk_profiles_filter(u64 chunk_type, | |||
3123 | return 1; | 3122 | return 1; |
3124 | } | 3123 | } |
3125 | 3124 | ||
3126 | static int chunk_usage_filter(struct btrfs_fs_info *fs_info, u64 chunk_offset, | 3125 | static int chunk_usage_range_filter(struct btrfs_fs_info *fs_info, u64 chunk_offset, |
3127 | struct btrfs_balance_args *bargs) | 3126 | struct btrfs_balance_args *bargs) |
3128 | { | 3127 | { |
3129 | struct btrfs_block_group_cache *cache; | 3128 | struct btrfs_block_group_cache *cache; |
@@ -3156,7 +3155,7 @@ static int chunk_usage_filter(struct btrfs_fs_info *fs_info, u64 chunk_offset, | |||
3156 | return ret; | 3155 | return ret; |
3157 | } | 3156 | } |
3158 | 3157 | ||
3159 | static int chunk_usage_range_filter(struct btrfs_fs_info *fs_info, | 3158 | static int chunk_usage_filter(struct btrfs_fs_info *fs_info, |
3160 | u64 chunk_offset, struct btrfs_balance_args *bargs) | 3159 | u64 chunk_offset, struct btrfs_balance_args *bargs) |
3161 | { | 3160 | { |
3162 | struct btrfs_block_group_cache *cache; | 3161 | struct btrfs_block_group_cache *cache; |