summaryrefslogtreecommitdiff
path: root/fs/bcachefs/buckets.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2021-03-12 16:55:28 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:08:55 -0400
commitb3b66e30445e42a94fa171fad99e0b4e4e43c1ac (patch)
treee2a425848894d9e0fddd1b740e72d8ceb1cd62a9 /fs/bcachefs/buckets.c
parent53b3e3c0e2f14f661cd61bbc9b82dc9383f783b9 (diff)
downloadlwn-b3b66e30445e42a94fa171fad99e0b4e4e43c1ac.tar.gz
lwn-b3b66e30445e42a94fa171fad99e0b4e4e43c1ac.zip
bcachefs: Have fsck check for stripe pointers matching stripe
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/buckets.c')
-rw-r--r--fs/bcachefs/buckets.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/bcachefs/buckets.c b/fs/bcachefs/buckets.c
index 55b9818a1dc2..7bf2fded816f 100644
--- a/fs/bcachefs/buckets.c
+++ b/fs/bcachefs/buckets.c
@@ -1215,6 +1215,8 @@ static int bch2_mark_stripe(struct bch_fs *c,
m->block_sectors[i] =
stripe_blockcount_get(new_s, i);
m->blocks_nonempty += !!m->block_sectors[i];
+
+ m->ptrs[i] = new_s->ptrs[i];
}
bch2_bkey_to_replicas(&m->r.e, new);