projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bb6bbf4
)
bcachefs: fix a possible bcachefs checksum mapping error opt-checksum enum to type...
author
Janpieter Sollie
<janpieter.sollie@edpnet.be>
Sun, 13 Jun 2021 20:01:08 +0000
(22:01 +0200)
committer
Kent Overstreet
<kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:06 +0000
(17:09 -0400)
This fixes some rare cases where the metadata checksum option specified
may map to the wrong actual checksum type.
Signed-off-by: Janpieter Sollie <janpieter.sollie@edpnet.be>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/super-io.c
patch
|
blob
|
history
diff --git
a/fs/bcachefs/super-io.c
b/fs/bcachefs/super-io.c
index fc6fb302706ac939e35f9ab1e8c76492ee629135..403e77e2c515d2242eb2133a81719d1e2e8f4eaa 100644
(file)
--- a/
fs/bcachefs/super-io.c
+++ b/
fs/bcachefs/super-io.c
@@
-684,7
+684,7
@@
static void write_one_super(struct bch_fs *c, struct bch_dev *ca, unsigned idx)
sb->offset = sb->layout.sb_offset[idx];
- SET_BCH_SB_CSUM_TYPE(sb,
c->opts.metadata_checksum
);
+ SET_BCH_SB_CSUM_TYPE(sb,
bch2_csum_opt_to_type(c->opts.metadata_checksum, false)
);
sb->csum = csum_vstruct(c, BCH_SB_CSUM_TYPE(sb),
null_nonce(), sb);