aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/volumes.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/volumes.h')
-rw-r--r--fs/btrfs/volumes.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/btrfs/volumes.h b/fs/btrfs/volumes.h
index 12f297eb0559..35dec3efd78c 100644
--- a/fs/btrfs/volumes.h
+++ b/fs/btrfs/volumes.h
@@ -18,12 +18,16 @@
18 18
19#ifndef __BTRFS_VOLUMES_ 19#ifndef __BTRFS_VOLUMES_
20#define __BTRFS_VOLUMES_ 20#define __BTRFS_VOLUMES_
21
21struct btrfs_device { 22struct btrfs_device {
22 struct list_head dev_list; 23 struct list_head dev_list;
23 struct btrfs_root *dev_root; 24 struct btrfs_root *dev_root;
25 spinlock_t io_lock;
24 26
25 struct block_device *bdev; 27 struct block_device *bdev;
26 28
29 u64 total_ios;
30
27 char *name; 31 char *name;
28 32
29 /* the internal btrfs device id */ 33 /* the internal btrfs device id */
@@ -68,9 +72,9 @@ struct btrfs_fs_devices {
68int btrfs_alloc_dev_extent(struct btrfs_trans_handle *trans, 72int btrfs_alloc_dev_extent(struct btrfs_trans_handle *trans,
69 struct btrfs_device *device, 73 struct btrfs_device *device,
70 u64 owner, u64 num_bytes, u64 *start); 74 u64 owner, u64 num_bytes, u64 *start);
71int btrfs_map_block(struct btrfs_mapping_tree *map_tree, 75int btrfs_map_block(struct btrfs_mapping_tree *map_tree, int rw, int stripe_nr,
72 u64 logical, u64 *phys, u64 *length, 76 u64 logical, u64 *phys, u64 *length,
73 struct btrfs_device **dev); 77 struct btrfs_device **dev, int *total_stripes);
74int btrfs_read_sys_array(struct btrfs_root *root); 78int btrfs_read_sys_array(struct btrfs_root *root);
75int btrfs_read_chunk_tree(struct btrfs_root *root); 79int btrfs_read_chunk_tree(struct btrfs_root *root);
76int btrfs_alloc_chunk(struct btrfs_trans_handle *trans, 80int btrfs_alloc_chunk(struct btrfs_trans_handle *trans,
@@ -80,9 +84,6 @@ void btrfs_mapping_init(struct btrfs_mapping_tree *tree);
80void btrfs_mapping_tree_free(struct btrfs_mapping_tree *tree); 84void btrfs_mapping_tree_free(struct btrfs_mapping_tree *tree);
81int btrfs_map_bio(struct btrfs_root *root, int rw, struct bio *bio); 85int btrfs_map_bio(struct btrfs_root *root, int rw, struct bio *bio);
82int btrfs_read_super_device(struct btrfs_root *root, struct extent_buffer *buf); 86int btrfs_read_super_device(struct btrfs_root *root, struct extent_buffer *buf);
83int btrfs_map_block(struct btrfs_mapping_tree *map_tree,
84 u64 logical, u64 *phys, u64 *length,
85 struct btrfs_device **dev);
86int btrfs_open_devices(struct btrfs_fs_devices *fs_devices, 87int btrfs_open_devices(struct btrfs_fs_devices *fs_devices,
87 int flags, void *holder); 88 int flags, void *holder);
88int btrfs_scan_one_device(const char *path, int flags, void *holder, 89int btrfs_scan_one_device(const char *path, int flags, void *holder,