From: Zhao Lei <zhaolei@xxxxxxxxxxxxxx>
Current code of page level repair for dev-replace can only support
io-error, we can't use it in checksum-fail case.
We can skip this kind of repair in dev-replace just as we in scrub.
Signed-off-by: Zhao Lei <zhaolei@xxxxxxxxxxxxxx>
Signed-off-by: Miao Xie <miaox@xxxxxxxxxxxxxx>
---
fs/btrfs/scrub.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index 9afc6dd..6cf0dc7 100644
--- a/fs/btrfs/scrub.c
+++ b/fs/btrfs/scrub.c
@@ -1099,6 +1099,10 @@ nodatasum_case:
}
}
+ /* can only fix I/O errors from here on */
+ if (sblock_bad->no_io_error_seen)
+ goto did_not_correct_error;
+
/*
* for dev_replace, pick good pages and write to the target device.
*/
@@ -1181,10 +1185,6 @@ nodatasum_case:
* area are unreadable.
*/
- /* can only fix I/O errors from here on */
- if (sblock_bad->no_io_error_seen)
- goto did_not_correct_error;
-
success = 1;
for (page_num = 0; page_num < sblock_bad->page_count; page_num++) {
struct scrub_page *page_bad = sblock_bad->pagev[page_num];
--
1.8.5.1
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html