diff options
author | Ingo Molnar <mingo@kernel.org> | 2015-06-02 02:05:42 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-06-02 02:05:42 -0400 |
commit | f407a8258610169cd8e975dba7f0b2824562014c (patch) | |
tree | 6c87b2d168a4665411a9e16b9f481599f2db25bc /fs/btrfs/extent-tree.c | |
parent | 960d447b94b22ceba286917056871d1dac8da697 (diff) | |
parent | c46a024ea5eb0165114dbbc8c82c29b7bcf66e71 (diff) |
Merge branch 'linus' into sched/core, to resolve conflict
Conflicts:
arch/sparc/include/asm/topology_64.h
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r-- | fs/btrfs/extent-tree.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 7effed6f2fa6..0ec3acd14cbf 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c | |||
@@ -8829,6 +8829,24 @@ again: | |||
8829 | goto again; | 8829 | goto again; |
8830 | } | 8830 | } |
8831 | 8831 | ||
8832 | /* | ||
8833 | * if we are changing raid levels, try to allocate a corresponding | ||
8834 | * block group with the new raid level. | ||
8835 | */ | ||
8836 | alloc_flags = update_block_group_flags(root, cache->flags); | ||
8837 | if (alloc_flags != cache->flags) { | ||
8838 | ret = do_chunk_alloc(trans, root, alloc_flags, | ||
8839 | CHUNK_ALLOC_FORCE); | ||
8840 | /* | ||
8841 | * ENOSPC is allowed here, we may have enough space | ||
8842 | * already allocated at the new raid level to | ||
8843 | * carry on | ||
8844 | */ | ||
8845 | if (ret == -ENOSPC) | ||
8846 | ret = 0; | ||
8847 | if (ret < 0) | ||
8848 | goto out; | ||
8849 | } | ||
8832 | 8850 | ||
8833 | ret = set_block_group_ro(cache, 0); | 8851 | ret = set_block_group_ro(cache, 0); |
8834 | if (!ret) | 8852 | if (!ret) |
@@ -8842,7 +8860,9 @@ again: | |||
8842 | out: | 8860 | out: |
8843 | if (cache->flags & BTRFS_BLOCK_GROUP_SYSTEM) { | 8861 | if (cache->flags & BTRFS_BLOCK_GROUP_SYSTEM) { |
8844 | alloc_flags = update_block_group_flags(root, cache->flags); | 8862 | alloc_flags = update_block_group_flags(root, cache->flags); |
8863 | lock_chunks(root->fs_info->chunk_root); | ||
8845 | check_system_chunk(trans, root, alloc_flags); | 8864 | check_system_chunk(trans, root, alloc_flags); |
8865 | unlock_chunks(root->fs_info->chunk_root); | ||
8846 | } | 8866 | } |
8847 | mutex_unlock(&root->fs_info->ro_block_group_mutex); | 8867 | mutex_unlock(&root->fs_info->ro_block_group_mutex); |
8848 | 8868 | ||