Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 300080
b: refs/heads/master
c: ea9947b
h: refs/heads/master
v: v3
  • Loading branch information
Stefan Behrens authored and Chris Mason committed May 4, 2012
1 parent 3221033 commit 23f51e2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d04b1debc92535453df2494d0b019edf0bb91003
refs/heads/master: ea9947b4395fa34666086b2fa6f686e94903e047
7 changes: 7 additions & 0 deletions trunk/fs/btrfs/scrub.c
Original file line number Diff line number Diff line change
Expand Up @@ -998,6 +998,7 @@ static int scrub_setup_recheck_block(struct scrub_dev *sdev,
page = sblock->pagev + page_index;
page->logical = logical;
page->physical = bbio->stripes[mirror_index].physical;
/* for missing devices, bdev is NULL */
page->bdev = bbio->stripes[mirror_index].dev->bdev;
page->mirror_num = mirror_index + 1;
page->page = alloc_page(GFP_NOFS);
Expand Down Expand Up @@ -1042,6 +1043,12 @@ static int scrub_recheck_block(struct btrfs_fs_info *fs_info,
struct scrub_page *page = sblock->pagev + page_num;
DECLARE_COMPLETION_ONSTACK(complete);

if (page->bdev == NULL) {
page->io_error = 1;
sblock->no_io_error_seen = 0;
continue;
}

BUG_ON(!page->page);
bio = bio_alloc(GFP_NOFS, 1);
if (!bio)
Expand Down

0 comments on commit 23f51e2

Please sign in to comment.