]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
bcachefs: Improve copygc_wait_to_text()
authorKent Overstreet <kent.overstreet@linux.dev>
Sat, 29 Jun 2024 20:04:40 +0000 (16:04 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 14 Jul 2024 23:00:16 +0000 (19:00 -0400)
printing the raw values can occasionally be very useful

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/movinggc.c

index eb49dd045eff5c21283c68b81c0c5c160176c0b8..deef4f024d20bdc8acba5f66ac01b7447b16259f 100644 (file)
@@ -290,18 +290,23 @@ unsigned long bch2_copygc_wait_amount(struct bch_fs *c)
 
 void bch2_copygc_wait_to_text(struct printbuf *out, struct bch_fs *c)
 {
-       prt_printf(out, "Currently waiting for:     ");
+       printbuf_tabstop_push(out, 32);
+       prt_printf(out, "running:\t%u\n",               c->copygc_running);
+       prt_printf(out, "copygc_wait:\t%llu\n",         c->copygc_wait);
+       prt_printf(out, "copygc_wait_at:\t%llu\n",      c->copygc_wait_at);
+
+       prt_printf(out, "Currently waiting for:\t");
        prt_human_readable_u64(out, max(0LL, c->copygc_wait -
                                        atomic64_read(&c->io_clock[WRITE].now)) << 9);
        prt_newline(out);
 
-       prt_printf(out, "Currently waiting since:   ");
+       prt_printf(out, "Currently waiting since:\t");
        prt_human_readable_u64(out, max(0LL,
                                        atomic64_read(&c->io_clock[WRITE].now) -
                                        c->copygc_wait_at) << 9);
        prt_newline(out);
 
-       prt_printf(out, "Currently calculated wait: ");
+       prt_printf(out, "Currently calculated wait:\t");
        prt_human_readable_u64(out, bch2_copygc_wait_amount(c));
        prt_newline(out);
 }