aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-04-09 16:28:12 -0400
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:04:01 -0400
commitcea9e4452ebaf18dd0951e90dc84d82a5dee40b2 (patch)
tree94f6a3c4fa25ebdff1f46d8b41ab58ee92723609 /fs/btrfs/inode.c
parentd18a2c447524751137a12cc8ccaf9d1e0b7fa1b3 (diff)
Change btrfs_map_block to return a structure with mappings for all stripes
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r--fs/btrfs/inode.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index a8ae68c6fbb8..7ae677d8a6de 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -301,12 +301,9 @@ int btrfs_merge_bio_hook(struct page *page, unsigned long offset,
301{ 301{
302 struct btrfs_root *root = BTRFS_I(page->mapping->host)->root; 302 struct btrfs_root *root = BTRFS_I(page->mapping->host)->root;
303 struct btrfs_mapping_tree *map_tree; 303 struct btrfs_mapping_tree *map_tree;
304 struct btrfs_device *dev;
305 u64 logical = bio->bi_sector << 9; 304 u64 logical = bio->bi_sector << 9;
306 u64 physical;
307 u64 length = 0; 305 u64 length = 0;
308 u64 map_length; 306 u64 map_length;
309 int total_devs;
310 struct bio_vec *bvec; 307 struct bio_vec *bvec;
311 int i; 308 int i;
312 int ret; 309 int ret;
@@ -316,8 +313,9 @@ int btrfs_merge_bio_hook(struct page *page, unsigned long offset,
316 } 313 }
317 map_tree = &root->fs_info->mapping_tree; 314 map_tree = &root->fs_info->mapping_tree;
318 map_length = length; 315 map_length = length;
319 ret = btrfs_map_block(map_tree, READ, 0, logical, &physical, 316 ret = btrfs_map_block(map_tree, READ, logical,
320 &map_length, &dev, &total_devs); 317 &map_length, NULL);
318
321 if (map_length < length + size) { 319 if (map_length < length + size) {
322 return 1; 320 return 1;
323 } 321 }