bcachefs: Fix sb_field_counters formatting
authorKent Overstreet <kent.overstreet@linux.dev>
Fri, 16 Sep 2022 22:39:01 +0000 (18:39 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:40 +0000 (17:09 -0400)
We have counters with longer names now, so adjust the tabstop - also,
make sure there's always a space printed between the name and the
number.

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

index 745f856e6d3e9b351a4eef7c6038a542c1dc330c..edd1b2537f482991c48d0c67b60f1a3d9a857667 100644 (file)
@@ -36,7 +36,7 @@ void bch2_sb_counters_to_text(struct printbuf *out, struct bch_sb *sb,
 
        for (i = 0; i < nr; i++) {
                if (i < BCH_COUNTER_NR)
-                       prt_printf(out, "%s", bch2_counter_names[i]);
+                       prt_printf(out, "%s ", bch2_counter_names[i]);
                else
                        prt_printf(out, "(unknown)");
 
index 4953f54e94d6036bbfbc9bf3e1aca18fa614c0c6..220fda28c865334f4f53f6d2e5ab2ab7709903f6 100644 (file)
@@ -1483,7 +1483,7 @@ void bch2_sb_to_text(struct printbuf *out, struct bch_sb *sb,
        unsigned nr_devices = 0;
 
        if (!out->nr_tabstops)
-               printbuf_tabstop_push(out, 32);
+               printbuf_tabstop_push(out, 44);
 
        mi = bch2_sb_get_members(sb);
        if (mi) {