diff --git a/fs/bcachefs/alloc_foreground.c b/fs/bcachefs/alloc_foreground.c index cc12baa1a09f..cc0a202afdd2 100644 --- a/fs/bcachefs/alloc_foreground.c +++ b/fs/bcachefs/alloc_foreground.c @@ -1631,6 +1631,9 @@ void bch2_fs_alloc_debug_to_text(struct printbuf *out, struct bch_fs *c) nr[c->open_buckets[i].data_type]++; printbuf_tabstop_push(out, 24); + + percpu_down_read(&c->mark_lock); + prt_printf(out, "hidden\t%llu\n", bch2_fs_usage_read_one(c, &c->usage_base->b.hidden)); prt_printf(out, "btree\t%llu\n", bch2_fs_usage_read_one(c, &c->usage_base->b.btree)); prt_printf(out, "data\t%llu\n", bch2_fs_usage_read_one(c, &c->usage_base->b.data)); @@ -1647,6 +1650,8 @@ void bch2_fs_alloc_debug_to_text(struct printbuf *out, struct bch_fs *c) prt_printf(out, "open_buckets_btree\t%u\n", nr[BCH_DATA_btree]); prt_printf(out, "open_buckets_user\t%u\n", nr[BCH_DATA_user]); prt_printf(out, "btree reserve cache\t%u\n", c->btree_reserve_cache_nr); + + percpu_up_read(&c->mark_lock); } void bch2_print_allocator_stuck(struct bch_fs *c)