Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
f7643bc9
Commit
f7643bc9
authored
Apr 17, 2024
by
Kent Overstreet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: make btree read errors silent during scan
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
5a2d1521
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
fs/bcachefs/btree_io.c
fs/bcachefs/btree_io.c
+11
-5
No files found.
fs/bcachefs/btree_io.c
View file @
f7643bc9
...
@@ -555,6 +555,7 @@ static int __btree_err(int ret,
...
@@ -555,6 +555,7 @@ static int __btree_err(int ret,
const
char
*
fmt
,
...)
const
char
*
fmt
,
...)
{
{
struct
printbuf
out
=
PRINTBUF
;
struct
printbuf
out
=
PRINTBUF
;
bool
silent
=
c
->
curr_recovery_pass
==
BCH_RECOVERY_PASS_scan_for_btree_nodes
;
va_list
args
;
va_list
args
;
btree_err_msg
(
&
out
,
c
,
ca
,
b
,
i
,
b
->
written
,
write
);
btree_err_msg
(
&
out
,
c
,
ca
,
b
,
i
,
b
->
written
,
write
);
...
@@ -576,12 +577,14 @@ static int __btree_err(int ret,
...
@@ -576,12 +577,14 @@ static int __btree_err(int ret,
if
(
!
have_retry
&&
ret
==
-
BCH_ERR_btree_node_read_err_must_retry
)
if
(
!
have_retry
&&
ret
==
-
BCH_ERR_btree_node_read_err_must_retry
)
ret
=
-
BCH_ERR_btree_node_read_err_bad_node
;
ret
=
-
BCH_ERR_btree_node_read_err_bad_node
;
if
(
ret
!=
-
BCH_ERR_btree_node_read_err_fixable
)
if
(
!
silent
&&
ret
!=
-
BCH_ERR_btree_node_read_err_fixable
)
bch2_sb_error_count
(
c
,
err_type
);
bch2_sb_error_count
(
c
,
err_type
);
switch
(
ret
)
{
switch
(
ret
)
{
case
-
BCH_ERR_btree_node_read_err_fixable
:
case
-
BCH_ERR_btree_node_read_err_fixable
:
ret
=
bch2_fsck_err
(
c
,
FSCK_CAN_FIX
,
err_type
,
"%s"
,
out
.
buf
);
ret
=
!
silent
?
bch2_fsck_err
(
c
,
FSCK_CAN_FIX
,
err_type
,
"%s"
,
out
.
buf
)
:
-
BCH_ERR_fsck_fix
;
if
(
ret
!=
-
BCH_ERR_fsck_fix
&&
if
(
ret
!=
-
BCH_ERR_fsck_fix
&&
ret
!=
-
BCH_ERR_fsck_ignore
)
ret
!=
-
BCH_ERR_fsck_ignore
)
goto
fsck_err
;
goto
fsck_err
;
...
@@ -589,14 +592,17 @@ static int __btree_err(int ret,
...
@@ -589,14 +592,17 @@ static int __btree_err(int ret,
break
;
break
;
case
-
BCH_ERR_btree_node_read_err_want_retry
:
case
-
BCH_ERR_btree_node_read_err_want_retry
:
case
-
BCH_ERR_btree_node_read_err_must_retry
:
case
-
BCH_ERR_btree_node_read_err_must_retry
:
bch2_print_string_as_lines
(
KERN_ERR
,
out
.
buf
);
if
(
!
silent
)
bch2_print_string_as_lines
(
KERN_ERR
,
out
.
buf
);
break
;
break
;
case
-
BCH_ERR_btree_node_read_err_bad_node
:
case
-
BCH_ERR_btree_node_read_err_bad_node
:
bch2_print_string_as_lines
(
KERN_ERR
,
out
.
buf
);
if
(
!
silent
)
bch2_print_string_as_lines
(
KERN_ERR
,
out
.
buf
);
ret
=
bch2_topology_error
(
c
);
ret
=
bch2_topology_error
(
c
);
break
;
break
;
case
-
BCH_ERR_btree_node_read_err_incompatible
:
case
-
BCH_ERR_btree_node_read_err_incompatible
:
bch2_print_string_as_lines
(
KERN_ERR
,
out
.
buf
);
if
(
!
silent
)
bch2_print_string_as_lines
(
KERN_ERR
,
out
.
buf
);
ret
=
-
BCH_ERR_fsck_errors_not_fixed
;
ret
=
-
BCH_ERR_fsck_errors_not_fixed
;
break
;
break
;
default:
default:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment