bcachefs: add capacity, reserved to fs_alloc_debug_to_text()
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
8a3c8303e2
commit
26a170aa61
@ -2336,6 +2336,7 @@ void bch2_recalc_capacity(struct bch_fs *c)
|
||||
|
||||
reserved_sectors = min(reserved_sectors, capacity);
|
||||
|
||||
c->reserved = reserved_sectors;
|
||||
c->capacity = capacity - reserved_sectors;
|
||||
|
||||
c->bucket_size_max = bucket_size_max;
|
||||
|
@ -1706,6 +1706,8 @@ void bch2_fs_alloc_debug_to_text(struct printbuf *out, struct bch_fs *c)
|
||||
printbuf_tabstops_reset(out);
|
||||
printbuf_tabstop_push(out, 24);
|
||||
|
||||
prt_printf(out, "capacity\t%llu\n", c->capacity);
|
||||
prt_printf(out, "reserved\t%llu\n", c->reserved);
|
||||
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));
|
||||
|
@ -872,6 +872,7 @@ struct bch_fs {
|
||||
struct bch_devs_mask rw_devs[BCH_DATA_NR];
|
||||
|
||||
u64 capacity; /* sectors */
|
||||
u64 reserved; /* sectors */
|
||||
|
||||
/*
|
||||
* When capacity _decreases_ (due to a disk being removed), we
|
||||
|
Loading…
x
Reference in New Issue
Block a user