bcachefs: Print out counters correctly
authorKent Overstreet <kent.overstreet@linux.dev>
Thu, 30 Mar 2023 22:49:02 +0000 (18:49 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:59 +0000 (17:09 -0400)
Most counters aren't in units of sectors, and the ones that are should
just be switched to bytes, for simplicity.

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

index 6be6be881dbdd51e6f97989e1a061d591ce64221..b2274cb351721fc2218bac86ba1c17849ad86c3e 100644 (file)
@@ -602,12 +602,12 @@ SHOW(bch2_fs_counters)
                        counter_since_mount = counter - c->counters_on_mount[BCH_COUNTER_##t];\
                        prt_printf(out, "since mount:");                                \
                        prt_tab(out);                                           \
-                       prt_human_readable_u64(out, counter_since_mount << 9);  \
+                       prt_human_readable_u64(out, counter_since_mount);       \
                        prt_newline(out);                                       \
                                                                                \
                        prt_printf(out, "since filesystem creation:");          \
                        prt_tab(out);                                           \
-                       prt_human_readable_u64(out, counter << 9);              \
+                       prt_human_readable_u64(out, counter);                   \
                        prt_newline(out);                                       \
                }
        BCH_PERSISTENT_COUNTERS()