btrfs: fix raid56 scrub failed in xfstests btrfs/072
diff mbox

Message ID 1420767580-19380-1-git-send-email-guihc.fnst@cn.fujitsu.com
State Accepted
Headers show

Commit Message

Gui Hecheng Jan. 9, 2015, 1:39 a.m. UTC
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>
---
 fs/btrfs/scrub.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Miao Xie Jan. 9, 2015, 5:31 a.m. UTC | #1
On Fri, 09 Jan 2015 09:39:40 +0800, Gui Hecheng wrote:
> 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.

Reviewed-by: Miao Xie <miaoxie@huawei.com>

> 
> Signed-off-by: Gui Hecheng <guihc.fnst@cn.fujitsu.com>
> Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
> ---
>  fs/btrfs/scrub.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
> index f2bb13a..aa8ff75 100644
> --- a/fs/btrfs/scrub.c
> +++ b/fs/btrfs/scrub.c
> @@ -3065,6 +3065,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
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Sterba Jan. 16, 2015, 11 a.m. UTC | #2
On Fri, Jan 09, 2015 at 09:39:40AM +0800, Gui Hecheng wrote:
> 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>

Chris, please add this patch to 3.19-rc queue, followup to the new
raid56 scrub code.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Qu Wenruo Jan. 23, 2015, 1:56 a.m. UTC | #3
-------- Original Message --------
Subject: Re: [PATCH] btrfs: fix raid56 scrub failed in xfstests btrfs/072
From: David Sterba <dsterba@suse.cz>
To: <clm@fb.com>
Date: 2015?01?16? 19:00
> On Fri, Jan 09, 2015 at 09:39:40AM +0800, Gui Hecheng wrote:
>> 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>
> Chris, please add this patch to 3.19-rc queue, followup to the new
> raid56 scrub code.
Hi Chris,

This patch doesn't seems to be included in 3.19-rc5, would you please 
add it to next rc?

Thanks,
Qu
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch
diff mbox

diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index f2bb13a..aa8ff75 100644
--- a/fs/btrfs/scrub.c
+++ b/fs/btrfs/scrub.c
@@ -3065,6 +3065,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