diff --git a/c_src/cmd_fs.c b/c_src/cmd_fs.c index 11c3434a..7265a4f1 100644 --- a/c_src/cmd_fs.c +++ b/c_src/cmd_fs.c @@ -379,8 +379,11 @@ static int fs_usage_v1_to_text(struct printbuf *out, if (fields & FS_USAGE_btree) accounting_types |= BIT(BCH_DISK_ACCOUNTING_btree); - if (fields & FS_USAGE_rebalance_work) + if (fields & FS_USAGE_rebalance_work) { accounting_types |= BIT(BCH_DISK_ACCOUNTING_rebalance_work); + accounting_types |= BIT(BCH_DISK_ACCOUNTING_reconcile_work); + accounting_types |= BIT(BCH_DISK_ACCOUNTING_dev_leaving); + } struct bch_ioctl_query_accounting *a = bchu_fs_accounting(fs, accounting_types); @@ -493,6 +496,20 @@ static int fs_usage_v1_to_text(struct printbuf *out, prt_units_u64(out, a->v.d[0] << 9); prt_newline(out); break; + case BCH_DISK_ACCOUNTING_reconcile_work: + if (new_type) { + prt_printf(out, "\nPending rebalance work:\n"); + printbuf_tabstops_reset(out); + printbuf_tabstop_push(out, 16); + printbuf_tabstop_push(out, 16); + } + bch2_prt_reconcile_accounting_type(out, acc_k.reconcile_work.type); + prt_char(out, ':'); + prt_tab(out); + prt_units_u64(out, a->v.d[0] << 9); + prt_tab_rjust(out); + prt_newline(out); + break; } } @@ -648,6 +665,9 @@ int cmd_fs_usage(int argc, char *argv[]) } args_shift(optind); + if (!fields) + fields |= FS_USAGE_rebalance_work; + if (!argc) { printbuf_reset(&buf); buf.human_readable_units = human_readable;