bcachefs: rebalance_status now shows correct units
authorDaniel Hill <daniel@gluo.nz>
Thu, 18 Jan 2024 11:27:44 +0000 (00:27 +1300)
committerKent Overstreet <kent.overstreet@linux.dev>
Thu, 14 Mar 2024 01:22:25 +0000 (21:22 -0400)
Signed-off-by: Daniel Hill <daniel@gluo.nz>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/rebalance.c

index 22d1017aa49b975756905a9a69ce8bcd82416ca3..56336f3dd1d0771b94c30aaa78d2c6b0d00617e7 100644 (file)
@@ -412,11 +412,11 @@ void bch2_rebalance_status_to_text(struct printbuf *out, struct bch_fs *c)
                u64 now = atomic64_read(&c->io_clock[WRITE].now);
 
                prt_str(out, "io wait duration:  ");
-               bch2_prt_human_readable_s64(out, r->wait_iotime_end - r->wait_iotime_start);
+               bch2_prt_human_readable_s64(out, (r->wait_iotime_end - r->wait_iotime_start) << 9);
                prt_newline(out);
 
                prt_str(out, "io wait remaining: ");
-               bch2_prt_human_readable_s64(out, r->wait_iotime_end - now);
+               bch2_prt_human_readable_s64(out, (r->wait_iotime_end - now) << 9);
                prt_newline(out);
 
                prt_str(out, "duration waited:   ");