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
5e3c2083
Commit
5e3c2083
authored
Jun 28, 2024
by
Kent Overstreet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: Ratelimit checksum error messages
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
0f3372dc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
fs/bcachefs/checksum.c
fs/bcachefs/checksum.c
+3
-2
fs/bcachefs/io_write.c
fs/bcachefs/io_write.c
+4
-1
No files found.
fs/bcachefs/checksum.c
View file @
5e3c2083
...
...
@@ -10,6 +10,7 @@
#include <linux/xxhash.h>
#include <linux/key.h>
#include <linux/random.h>
#include <linux/ratelimit.h>
#include <linux/scatterlist.h>
#include <crypto/algapi.h>
#include <crypto/chacha.h>
...
...
@@ -436,7 +437,7 @@ int bch2_rechecksum_bio(struct bch_fs *c, struct bio *bio,
if
(
bch2_crc_cmp
(
merged
,
crc_old
.
csum
)
&&
!
c
->
opts
.
no_data_io
)
{
struct
printbuf
buf
=
PRINTBUF
;
prt_printf
(
&
buf
,
"checksum error in %s() (memory corruption or bug?)
\n
"
"expected %0llx:%0llx got %0llx:%0llx (old type "
,
"
expected %0llx:%0llx got %0llx:%0llx (old type "
,
__func__
,
crc_old
.
csum
.
hi
,
crc_old
.
csum
.
lo
,
...
...
@@ -446,7 +447,7 @@ int bch2_rechecksum_bio(struct bch_fs *c, struct bio *bio,
prt_str
(
&
buf
,
" new type "
);
bch2_prt_csum_type
(
&
buf
,
new_csum_type
);
prt_str
(
&
buf
,
")"
);
bch_err
(
c
,
"%s"
,
buf
.
buf
);
WARN_RATELIMIT
(
1
,
"%s"
,
buf
.
buf
);
printbuf_exit
(
&
buf
);
return
-
EIO
;
}
...
...
fs/bcachefs/io_write.c
View file @
5e3c2083
...
...
@@ -1080,7 +1080,10 @@ static int bch2_write_extent(struct bch_write_op *op, struct write_point *wp,
*
_dst
=
dst
;
return
more
;
csum_err:
bch_err
(
c
,
"%s write error: error verifying existing checksum while rewriting existing data (memory corruption?)"
,
bch_err_inum_offset_ratelimited
(
c
,
op
->
pos
.
inode
,
op
->
pos
.
offset
<<
9
,
"%s write error: error verifying existing checksum while rewriting existing data (memory corruption?)"
,
op
->
flags
&
BCH_WRITE_MOVE
?
"move"
:
"user"
);
ret
=
-
EIO
;
err:
...
...
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