diff options
author | Miao Xie <miaox@cn.fujitsu.com> | 2014-09-12 18:44:01 +0800 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2014-09-17 13:38:59 -0700 |
commit | 1203b6813ee84add8b4baa6d75e50ba85517e99c (patch) | |
tree | b9799ad854dfe4f213564354e89a272fda7cdddb /fs/btrfs/scrub.c | |
parent | ffdd2018dd0bbfc0d9855ed811dba67201766a2d (diff) |
Btrfs: modify clean_io_failure and make it suit direct io
We could not use clean_io_failure in the direct IO path because it got the
filesystem information from the page structure, but the page in the direct
IO bio didn't have the filesystem information in its structure. So we need
modify it and pass all the information it need by parameters.
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs/scrub.c')
-rw-r--r-- | fs/btrfs/scrub.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c index c026fa6b9553..b9c37ac9ed1b 100644 --- a/fs/btrfs/scrub.c +++ b/fs/btrfs/scrub.c @@ -679,8 +679,7 @@ static int scrub_fixup_readpage(u64 inum, u64 offset, u64 root, void *fixup_ctx) ret = -EIO; goto out; } - fs_info = BTRFS_I(inode)->root->fs_info; - ret = repair_io_failure(fs_info, offset, PAGE_SIZE, + ret = repair_io_failure(inode, offset, PAGE_SIZE, fixup->logical, page, offset - page_offset(page), fixup->mirror_num); |