diff mbox series

[v2,04/12] btrfs-progs: propagate extent item errors in lowmem mode

Message ID 06d91ded263de8668fdbb72d86eb26ab4dfaec45.1629322156.git.josef@toxicpanda.com (mailing list archive)
State New, archived
Headers show
Series btrfs-progs: make check handle invalid bg items | expand

Commit Message

Josef Bacik Aug. 18, 2021, 9:33 p.m. UTC
Test 044 was failing with lowmem because it was not bubbling up the
error to the user.  This is because we try to allow repair the
opportunity to clear the error, however if repair isn't set we simply do
not add the temporary error to the main error return variable.  Fix this
by adding the tmp_err to err before moving on to the next item.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
---
 check/mode-lowmem.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Qu Wenruo Aug. 19, 2021, 5:45 a.m. UTC | #1
On 2021/8/19 上午5:33, Josef Bacik wrote:
> Test 044 was failing with lowmem because it was not bubbling up the
> error to the user.  This is because we try to allow repair the
> opportunity to clear the error, however if repair isn't set we simply do
> not add the temporary error to the main error return variable.  Fix this
> by adding the tmp_err to err before moving on to the next item.
>
> Signed-off-by: Josef Bacik <josef@toxicpanda.com>

Reviewed-by: Qu Wenruo <wqu@suse.com>

Thanks,
Qu
> ---
>   check/mode-lowmem.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/check/mode-lowmem.c b/check/mode-lowmem.c
> index d278c927..14815519 100644
> --- a/check/mode-lowmem.c
> +++ b/check/mode-lowmem.c
> @@ -4390,6 +4390,7 @@ next:
>   		goto next;
>   	}
>
> +	err |= tmp_err;
>   	ptr_offset += btrfs_extent_inline_ref_size(type);
>   	goto next;
>
>
diff mbox series

Patch

diff --git a/check/mode-lowmem.c b/check/mode-lowmem.c
index d278c927..14815519 100644
--- a/check/mode-lowmem.c
+++ b/check/mode-lowmem.c
@@ -4390,6 +4390,7 @@  next:
 		goto next;
 	}
 
+	err |= tmp_err;
 	ptr_offset += btrfs_extent_inline_ref_size(type);
 	goto next;