diff options
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 9323e1c25ee1..50ba4ca167e7 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -2321,7 +2321,7 @@ static noinline int record_one_backref(u64 inum, u64 offset, u64 root_id, | |||
2321 | if (PTR_ERR(root) == -ENOENT) | 2321 | if (PTR_ERR(root) == -ENOENT) |
2322 | return 0; | 2322 | return 0; |
2323 | WARN_ON(1); | 2323 | WARN_ON(1); |
2324 | pr_debug("inum=%llu, offset=%llu, root_id=%llu\n", | 2324 | btrfs_debug(fs_info, "inum=%llu, offset=%llu, root_id=%llu", |
2325 | inum, offset, root_id); | 2325 | inum, offset, root_id); |
2326 | return PTR_ERR(root); | 2326 | return PTR_ERR(root); |
2327 | } | 2327 | } |
@@ -7878,18 +7878,19 @@ static int btrfs_check_dio_repairable(struct inode *inode, | |||
7878 | struct io_failure_record *failrec, | 7878 | struct io_failure_record *failrec, |
7879 | int failed_mirror) | 7879 | int failed_mirror) |
7880 | { | 7880 | { |
7881 | struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb); | ||
7881 | int num_copies; | 7882 | int num_copies; |
7882 | 7883 | ||
7883 | num_copies = btrfs_num_copies(BTRFS_I(inode)->root->fs_info, | 7884 | num_copies = btrfs_num_copies(fs_info, failrec->logical, failrec->len); |
7884 | failrec->logical, failrec->len); | ||
7885 | if (num_copies == 1) { | 7885 | if (num_copies == 1) { |
7886 | /* | 7886 | /* |
7887 | * we only have a single copy of the data, so don't bother with | 7887 | * we only have a single copy of the data, so don't bother with |
7888 | * all the retry and error correction code that follows. no | 7888 | * all the retry and error correction code that follows. no |
7889 | * matter what the error is, it is very likely to persist. | 7889 | * matter what the error is, it is very likely to persist. |
7890 | */ | 7890 | */ |
7891 | pr_debug("Check DIO Repairable: cannot repair, num_copies=%d, next_mirror %d, failed_mirror %d\n", | 7891 | btrfs_debug(fs_info, |
7892 | num_copies, failrec->this_mirror, failed_mirror); | 7892 | "Check DIO Repairable: cannot repair, num_copies=%d, next_mirror %d, failed_mirror %d", |
7893 | num_copies, failrec->this_mirror, failed_mirror); | ||
7893 | return 0; | 7894 | return 0; |
7894 | } | 7895 | } |
7895 | 7896 | ||
@@ -7899,8 +7900,9 @@ static int btrfs_check_dio_repairable(struct inode *inode, | |||
7899 | failrec->this_mirror++; | 7900 | failrec->this_mirror++; |
7900 | 7901 | ||
7901 | if (failrec->this_mirror > num_copies) { | 7902 | if (failrec->this_mirror > num_copies) { |
7902 | pr_debug("Check DIO Repairable: (fail) num_copies=%d, next_mirror %d, failed_mirror %d\n", | 7903 | btrfs_debug(fs_info, |
7903 | num_copies, failrec->this_mirror, failed_mirror); | 7904 | "Check DIO Repairable: (fail) num_copies=%d, next_mirror %d, failed_mirror %d", |
7905 | num_copies, failrec->this_mirror, failed_mirror); | ||
7904 | return 0; | 7906 | return 0; |
7905 | } | 7907 | } |
7906 | 7908 | ||