]> git.hungrycats.org Git - linux/commitdiff
btrfs: fix raid56 scrub failed in xfstests btrfs/072
authorGui Hecheng <guihc.fnst@cn.fujitsu.com>
Fri, 9 Jan 2015 01:39:40 +0000 (09:39 +0800)
committerZygo Blaxell <zblaxell@serenity.furryterror.org>
Sun, 29 Mar 2015 16:04:30 +0000 (12:04 -0400)
The xfstests btrfs/072 reports uncorrectable read errors in dmesg,
because scrub forgets to use commit_root for parity scrub routine
and scrub attempts to scrub those extents items whose contents are
not fully on disk.

To fix it, we just add the @search_commit_root flag back.

Signed-off-by: Gui Hecheng <guihc.fnst@cn.fujitsu.com>
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Reviewed-by: Miao Xie <miaoxie@huawei.com>
Signed-off-by: Chris Mason <clm@fb.com>
(cherry picked from commit 063c54dccdecb0479662778ddf54ee45aa55423d)

fs/btrfs/scrub.c

index 9d3322b8eed8fa26b47f63c463a270e8b7d30e25..43ceb794e998fd75e5916493565a1fcf5e5dee05 100644 (file)
@@ -2338,6 +2338,8 @@ static noinline_for_stack int scrub_stripe(struct scrub_ctx *sctx,
        path->search_commit_root = 1;
        path->skip_locking = 1;
 
+       ppath->search_commit_root = 1;
+       ppath->skip_locking = 1;
        /*
         * trigger the readahead for extent tree csum tree and wait for
         * completion. During readahead, the scrub is officially paused