summaryrefslogtreecommitdiff
path: root/fs/btrfs/volumes.h
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-04-03 16:29:03 -0400
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:04:01 -0400
commit8790d502e4401a4a3a4175b83a3a47e8d595c771 (patch)
tree7e01c053d6a99c3c2a6fb71a7338b083e953f0b3 /fs/btrfs/volumes.h
parent0ef8b2428a339e83fe225e82ef8bd0ea3f62b180 (diff)
downloadlinux-3.10-8790d502e4401a4a3a4175b83a3a47e8d595c771.tar.gz
linux-3.10-8790d502e4401a4a3a4175b83a3a47e8d595c771.tar.bz2
linux-3.10-8790d502e4401a4a3a4175b83a3a47e8d595c771.zip
Btrfs: Add support for mirroring across drives
Signed-off-by: Chris Mason <chris.mason@oracle.com>
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 12f297eb055..35dec3efd78 100644
--- a/fs/btrfs/volumes.h
+++ b/fs/btrfs/volumes.h
@@ -18,12 +18,16 @@
#ifndef __BTRFS_VOLUMES_
#define __BTRFS_VOLUMES_
+
struct btrfs_device {
struct list_head dev_list;
struct btrfs_root *dev_root;
+ spinlock_t io_lock;
struct block_device *bdev;
+ u64 total_ios;
+
char *name;
/* the internal btrfs device id */
@@ -68,9 +72,9 @@ struct btrfs_fs_devices {
int btrfs_alloc_dev_extent(struct btrfs_trans_handle *trans,
struct btrfs_device *device,
u64 owner, u64 num_bytes, u64 *start);
-int btrfs_map_block(struct btrfs_mapping_tree *map_tree,
+int btrfs_map_block(struct btrfs_mapping_tree *map_tree, int rw, int stripe_nr,
u64 logical, u64 *phys, u64 *length,
- struct btrfs_device **dev);
+ struct btrfs_device **dev, int *total_stripes);
int btrfs_read_sys_array(struct btrfs_root *root);
int btrfs_read_chunk_tree(struct btrfs_root *root);
int btrfs_alloc_chunk(struct btrfs_trans_handle *trans,
@@ -80,9 +84,6 @@ void btrfs_mapping_init(struct btrfs_mapping_tree *tree);
void btrfs_mapping_tree_free(struct btrfs_mapping_tree *tree);
int btrfs_map_bio(struct btrfs_root *root, int rw, struct bio *bio);
int btrfs_read_super_device(struct btrfs_root *root, struct extent_buffer *buf);
-int btrfs_map_block(struct btrfs_mapping_tree *map_tree,
- u64 logical, u64 *phys, u64 *length,
- struct btrfs_device **dev);
int btrfs_open_devices(struct btrfs_fs_devices *fs_devices,
int flags, void *holder);
int btrfs_scan_one_device(const char *path, int flags, void *holder,