summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-10-16 06:32:12 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2024-10-18 00:49:48 -0400
commit4007bbb203a0c36e66bb2e785e1b2cb7266179d5 (patch)
treeb9282b5b885bd323e3c05e3bffc28c4c4c9d759c /fs
parenta0d11feefb1998204f095fa0400024403d233108 (diff)
bcachefS: ec: fix data type on stripe deletion
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs')
-rw-r--r--fs/bcachefs/ec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/ec.c b/fs/bcachefs/ec.c
index a2303425959d..a0aa5bb467d9 100644
--- a/fs/bcachefs/ec.c
+++ b/fs/bcachefs/ec.c
@@ -266,12 +266,12 @@ static int __mark_stripe_bucket(struct btree_trans *trans,
if (!deleting) {
a->stripe = s.k->p.offset;
a->stripe_redundancy = s.v->nr_redundant;
+ alloc_data_type_set(a, data_type);
} else {
a->stripe = 0;
a->stripe_redundancy = 0;
+ alloc_data_type_set(a, BCH_DATA_user);
}
-
- alloc_data_type_set(a, data_type);
err:
printbuf_exit(&buf);
return ret;