Skip to content

Commit 6a9f681

Browse files
author
Kent Overstreet
committed
bcachefs: Count BCH_DATA_parity backpointers correctly
These are counted as stripe data in the corresponding alloc keys. Signed-off-by: Kent Overstreet <[email protected]>
1 parent 04e9089 commit 6a9f681

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

fs/bcachefs/backpointers.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ void bch2_backpointer_to_text(struct printbuf *out, struct bch_fs *c, struct bke
5050
}
5151

5252
bch2_btree_id_level_to_text(out, bp.v->btree_id, bp.v->level);
53+
prt_str(out, " data_type=");
54+
bch2_prt_data_type(out, bp.v->data_type);
5355
prt_printf(out, " suboffset=%u len=%u gen=%u pos=",
5456
(u32) bp.k->p.offset & ~(~0U << MAX_EXTENT_COMPRESS_RATIO_SHIFT),
5557
bp.v->bucket_len,
@@ -791,6 +793,7 @@ static enum alloc_sector_counter data_type_to_alloc_counter(enum bch_data_type t
791793
case BCH_DATA_cached:
792794
return ALLOC_cached;
793795
case BCH_DATA_stripe:
796+
case BCH_DATA_parity:
794797
return ALLOC_stripe;
795798
default:
796799
BUG();

0 commit comments

Comments
 (0)