aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/volumes.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/volumes.c')
-rw-r--r--fs/btrfs/volumes.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index dd13eb81ee40..8ba3c9ebff93 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -33,17 +33,6 @@
33#include "volumes.h" 33#include "volumes.h"
34#include "async-thread.h" 34#include "async-thread.h"
35 35
36struct map_lookup {
37 u64 type;
38 int io_align;
39 int io_width;
40 int stripe_len;
41 int sector_size;
42 int num_stripes;
43 int sub_stripes;
44 struct btrfs_bio_stripe stripes[];
45};
46
47static int init_first_rw_device(struct btrfs_trans_handle *trans, 36static int init_first_rw_device(struct btrfs_trans_handle *trans,
48 struct btrfs_root *root, 37 struct btrfs_root *root,
49 struct btrfs_device *device); 38 struct btrfs_device *device);
@@ -1923,6 +1912,8 @@ static int btrfs_relocate_chunk(struct btrfs_root *root,
1923 1912
1924 BUG_ON(ret); 1913 BUG_ON(ret);
1925 1914
1915 trace_btrfs_chunk_free(root, map, chunk_offset, em->len);
1916
1926 if (map->type & BTRFS_BLOCK_GROUP_SYSTEM) { 1917 if (map->type & BTRFS_BLOCK_GROUP_SYSTEM) {
1927 ret = btrfs_del_sys_chunk(root, chunk_objectid, chunk_offset); 1918 ret = btrfs_del_sys_chunk(root, chunk_objectid, chunk_offset);
1928 BUG_ON(ret); 1919 BUG_ON(ret);
@@ -2650,6 +2641,8 @@ static int __btrfs_alloc_chunk(struct btrfs_trans_handle *trans,
2650 *num_bytes = chunk_bytes_by_type(type, calc_size, 2641 *num_bytes = chunk_bytes_by_type(type, calc_size,
2651 map->num_stripes, sub_stripes); 2642 map->num_stripes, sub_stripes);
2652 2643
2644 trace_btrfs_chunk_alloc(info->chunk_root, map, start, *num_bytes);
2645
2653 em = alloc_extent_map(GFP_NOFS); 2646 em = alloc_extent_map(GFP_NOFS);
2654 if (!em) { 2647 if (!em) {
2655 ret = -ENOMEM; 2648 ret = -ENOMEM;
@@ -2758,6 +2751,7 @@ static int __finish_chunk_alloc(struct btrfs_trans_handle *trans,
2758 item_size); 2751 item_size);
2759 BUG_ON(ret); 2752 BUG_ON(ret);
2760 } 2753 }
2754
2761 kfree(chunk); 2755 kfree(chunk);
2762 return 0; 2756 return 0;
2763} 2757}