]> git.hungrycats.org Git - linux/commitdiff
btrfs: Reset sblock->xxx_error stats before calling scrub_recheck_block_checksum
authorZhao Lei <zhaolei@cn.fujitsu.com>
Mon, 24 Aug 2015 13:10:18 +0000 (21:10 +0800)
committerZygo Blaxell <zblaxell@thirteen.furryterror.org>
Thu, 12 Nov 2015 03:52:12 +0000 (22:52 -0500)
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>
(cherry picked from commit 772d233f5dec86e38a96e58cc995e7b04ab4ec68)

Conflicts:
fs/btrfs/scrub.c

fs/btrfs/scrub.c

index c2c52da46956cbb16f48f84393ec3f0e8997f5f0..66e00116b41a80e09cc06ca5fa7dbad619ca1b96 100644 (file)
@@ -1498,6 +1498,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;