diff options
author | Zhao Lei <zhaolei@cn.fujitsu.com> | 2015-08-24 21:10:18 +0800 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2015-11-10 19:27:03 -0800 |
commit | 772d233f5dec86e38a96e58cc995e7b04ab4ec68 (patch) | |
tree | 05cd8e310d7d2abeb77faa1314d67fa188627f17 /fs/btrfs | |
parent | 4734b7ed79e1230602927a38bc4d04dbe9dd09c1 (diff) |
btrfs: Reset sblock->xxx_error stats before calling scrub_recheck_block_checksum
We should reset sblock->xxx_error stats before calling
scrub_recheck_block_checksum().
Current code run correctly because all sblock are allocated by
k[cz]alloc(), and the error stats are not got changed.
Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/scrub.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c index 12ed8a77f11c..95dc60a45fcb 100644 --- a/fs/btrfs/scrub.c +++ b/fs/btrfs/scrub.c @@ -1495,6 +1495,7 @@ static void scrub_recheck_block(struct btrfs_fs_info *fs_info, sblock->no_io_error_seen = 1; sblock->header_error = 0; sblock->checksum_error = 0; + sblock->generation_error = 0; for (page_num = 0; page_num < sblock->page_count; page_num++) { struct bio *bio; @@ -2203,6 +2204,9 @@ static void scrub_missing_raid56_worker(struct btrfs_work *work) logical = sblock->pagev[0]->logical; dev = sblock->pagev[0]->dev; + sblock->header_error = 0; + sblock->checksum_error = 0; + sblock->generation_error = 0; if (sblock->no_io_error_seen) { scrub_recheck_block_checksum(fs_info, sblock, is_metadata, have_csum, csum, generation, |