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
commitf188591e987e21b6f7f8864c66a02858b95b530e (patch)
tree996f04b7c8d1e8a626b123e7a2a217992d705c60 /fs/btrfs/inode.c
parent22c599485b1fdd95e4476a4752596a6cf6c6629a (diff)
Btrfs: Retry metadata reads in the face of checksum failures
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r--fs/btrfs/inode.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index e1ef1acdb350..8c2d5d036bd6 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -314,7 +314,7 @@ int btrfs_merge_bio_hook(struct page *page, unsigned long offset,
314 map_tree = &root->fs_info->mapping_tree; 314 map_tree = &root->fs_info->mapping_tree;
315 map_length = length; 315 map_length = length;
316 ret = btrfs_map_block(map_tree, READ, logical, 316 ret = btrfs_map_block(map_tree, READ, logical,
317 &map_length, NULL); 317 &map_length, NULL, 0);
318 318
319 if (map_length < length + size) { 319 if (map_length < length + size) {
320 return 1; 320 return 1;
@@ -322,7 +322,8 @@ int btrfs_merge_bio_hook(struct page *page, unsigned long offset,
322 return 0; 322 return 0;
323} 323}
324 324
325int btrfs_submit_bio_hook(struct inode *inode, int rw, struct bio *bio) 325int btrfs_submit_bio_hook(struct inode *inode, int rw, struct bio *bio,
326 int mirror_num)
326{ 327{
327 struct btrfs_root *root = BTRFS_I(inode)->root; 328 struct btrfs_root *root = BTRFS_I(inode)->root;
328 struct btrfs_trans_handle *trans; 329 struct btrfs_trans_handle *trans;
@@ -347,7 +348,7 @@ int btrfs_submit_bio_hook(struct inode *inode, int rw, struct bio *bio)
347 BUG_ON(ret); 348 BUG_ON(ret);
348 mutex_unlock(&root->fs_info->fs_mutex); 349 mutex_unlock(&root->fs_info->fs_mutex);
349mapit: 350mapit:
350 return btrfs_map_bio(root, rw, bio); 351 return btrfs_map_bio(root, rw, bio, mirror_num);
351} 352}
352 353
353int btrfs_readpage_io_hook(struct page *page, u64 start, u64 end) 354int btrfs_readpage_io_hook(struct page *page, u64 start, u64 end)