]> www.infradead.org Git - users/hch/dma-mapping.git/commitdiff
bcachefS: ec: fix data type on stripe deletion
authorKent Overstreet <kent.overstreet@linux.dev>
Wed, 16 Oct 2024 10:32:12 +0000 (06:32 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Fri, 18 Oct 2024 04:49:48 +0000 (00:49 -0400)
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/ec.c

index a2303425959dad0e38aaeab29ff1a8959d83ef47..a0aa5bb467d9405824b7bd19a01c0693a96da7dd 100644 (file)
@@ -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;