From c9163bb03b81e465019cf56d2edf47b70798e3ee Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Tue, 21 Feb 2023 19:22:44 -0500 Subject: bcachefs: Cached pointers should not be erasure coded There's no reason to erasure code cached pointers: we'll always have another copy, and it'll be cheaper to read the other copy than do a reconstruct read. And erasure coded cached pointers would add complications that we'd rather not have to deal with, so let's make sure to disallow them. Signed-off-by: Kent Overstreet --- fs/bcachefs/extents.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'fs/bcachefs/extents.h') diff --git a/fs/bcachefs/extents.h b/fs/bcachefs/extents.h index 1d8f3b309b07..c52a09832857 100644 --- a/fs/bcachefs/extents.h +++ b/fs/bcachefs/extents.h @@ -655,6 +655,8 @@ bool bch2_bkey_matches_ptr(struct bch_fs *, struct bkey_s_c, bool bch2_extents_match(struct bkey_s_c, struct bkey_s_c); bool bch2_extent_has_ptr(struct bkey_s_c, struct extent_ptr_decoded, struct bkey_s_c); +void bch2_extent_ptr_set_cached(struct bkey_s, struct bch_extent_ptr *); + bool bch2_extent_normalize(struct bch_fs *, struct bkey_s); void bch2_bkey_ptrs_to_text(struct printbuf *, struct bch_fs *, struct bkey_s_c); -- cgit v1.2.3