diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-03-22 00:16:31 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2022-06-09 15:37:02 -0400 |
commit | 9aca0622138661bc5ecf6f885408f9b87001cfb9 (patch) | |
tree | 1dc649c5df2e361046b7b61eafd983e76cc4def8 /fs/bcachefs/rebalance.c | |
parent | 8839a86c06a3f94799aece6aa0b673341c81d17b (diff) |
bcachefs: Convert to lib/printbuf.cprintbuf_v3_bcachefs
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/rebalance.c')
-rw-r--r-- | fs/bcachefs/rebalance.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/fs/bcachefs/rebalance.c b/fs/bcachefs/rebalance.c index d914892f5339..23cc46e95021 100644 --- a/fs/bcachefs/rebalance.c +++ b/fs/bcachefs/rebalance.c @@ -260,44 +260,44 @@ void bch2_rebalance_work_to_text(struct printbuf *out, struct bch_fs *c) out->tabstops[0] = 20; - pr_buf(out, "fullest_dev (%i):", w.dev_most_full_idx); - pr_tab(out); + prt_printf(out, "fullest_dev (%i):", w.dev_most_full_idx); + prt_tab(out); - bch2_hprint(out, w.dev_most_full_work << 9); - pr_buf(out, "/"); - bch2_hprint(out, w.dev_most_full_capacity << 9); - pr_newline(out); + prt_human_readable_u64(out, w.dev_most_full_work << 9); + prt_printf(out, "/"); + prt_human_readable_u64(out, w.dev_most_full_capacity << 9); + prt_newline(out); - pr_buf(out, "total work:"); - pr_tab(out); + prt_printf(out, "total work:"); + prt_tab(out); - bch2_hprint(out, w.total_work << 9); - pr_buf(out, "/"); - bch2_hprint(out, c->capacity << 9); - pr_newline(out); + prt_human_readable_u64(out, w.total_work << 9); + prt_printf(out, "/"); + prt_human_readable_u64(out, c->capacity << 9); + prt_newline(out); - pr_buf(out, "rate:"); - pr_tab(out); - pr_buf(out, "%u", r->pd.rate.rate); - pr_newline(out); + prt_printf(out, "rate:"); + prt_tab(out); + prt_printf(out, "%u", r->pd.rate.rate); + prt_newline(out); switch (r->state) { case REBALANCE_WAITING: - pr_buf(out, "waiting"); + prt_printf(out, "waiting"); break; case REBALANCE_THROTTLED: - pr_buf(out, "throttled for %lu sec or ", + prt_printf(out, "throttled for %lu sec or ", (r->throttled_until_cputime - jiffies) / HZ); - bch2_hprint(out, + prt_human_readable_u64(out, (r->throttled_until_iotime - atomic64_read(&c->io_clock[WRITE].now)) << 9); - pr_buf(out, " io"); + prt_printf(out, " io"); break; case REBALANCE_RUNNING: - pr_buf(out, "running"); + prt_printf(out, "running"); break; } - pr_newline(out); + prt_newline(out); } void bch2_rebalance_stop(struct bch_fs *c) |