Skip to content

Commit 8f523d4

Browse files
author
Kent Overstreet
committed
bcachefs: Improve copygc_wait_to_text()
printing the raw values can occasionally be very useful Signed-off-by: Kent Overstreet <[email protected]>
1 parent 27d033d commit 8f523d4

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

fs/bcachefs/movinggc.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,18 +290,23 @@ unsigned long bch2_copygc_wait_amount(struct bch_fs *c)
290290

291291
void bch2_copygc_wait_to_text(struct printbuf *out, struct bch_fs *c)
292292
{
293-
prt_printf(out, "Currently waiting for: ");
293+
printbuf_tabstop_push(out, 32);
294+
prt_printf(out, "running:\t%u\n", c->copygc_running);
295+
prt_printf(out, "copygc_wait:\t%llu\n", c->copygc_wait);
296+
prt_printf(out, "copygc_wait_at:\t%llu\n", c->copygc_wait_at);
297+
298+
prt_printf(out, "Currently waiting for:\t");
294299
prt_human_readable_u64(out, max(0LL, c->copygc_wait -
295300
atomic64_read(&c->io_clock[WRITE].now)) << 9);
296301
prt_newline(out);
297302

298-
prt_printf(out, "Currently waiting since: ");
303+
prt_printf(out, "Currently waiting since:\t");
299304
prt_human_readable_u64(out, max(0LL,
300305
atomic64_read(&c->io_clock[WRITE].now) -
301306
c->copygc_wait_at) << 9);
302307
prt_newline(out);
303308

304-
prt_printf(out, "Currently calculated wait: ");
309+
prt_printf(out, "Currently calculated wait:\t");
305310
prt_human_readable_u64(out, bch2_copygc_wait_amount(c));
306311
prt_newline(out);
307312
}

0 commit comments

Comments
 (0)