]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
bcachefs: Add missing printbuf_tabstops_reset() calls
authorKent Overstreet <kent.overstreet@linux.dev>
Sat, 29 Jun 2024 18:08:49 +0000 (14:08 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sat, 29 Jun 2024 22:14:18 +0000 (18:14 -0400)
Fixes warnings from bch2_print_allocator_stuck()

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

index 9d3d64746a5be625dfbf5168c079b3f5bfe61378..27d97c22ae2722504c6481fcb09612665565d640 100644 (file)
@@ -1703,6 +1703,7 @@ void bch2_fs_alloc_debug_to_text(struct printbuf *out, struct bch_fs *c)
        for (unsigned i = 0; i < ARRAY_SIZE(c->open_buckets); i++)
                nr[c->open_buckets[i].data_type]++;
 
+       printbuf_tabstops_reset(out);
        printbuf_tabstop_push(out, 24);
 
        percpu_down_read(&c->mark_lock);
@@ -1736,6 +1737,7 @@ void bch2_dev_alloc_debug_to_text(struct printbuf *out, struct bch_dev *ca)
        for (unsigned i = 0; i < ARRAY_SIZE(c->open_buckets); i++)
                nr[c->open_buckets[i].data_type]++;
 
+       printbuf_tabstops_reset(out);
        printbuf_tabstop_push(out, 12);
        printbuf_tabstop_push(out, 16);
        printbuf_tabstop_push(out, 16);
index 0f4ad9e64ad193907cfa1fc881b37a6993de7429..10b19791ec98e482c4a498d34b493bcfb76edd10 100644 (file)
@@ -1420,8 +1420,8 @@ void __bch2_journal_debug_to_text(struct printbuf *out, struct journal *j)
        unsigned long now = jiffies;
        u64 nr_writes = j->nr_flush_writes + j->nr_noflush_writes;
 
-       if (!out->nr_tabstops)
-               printbuf_tabstop_push(out, 28);
+       printbuf_tabstops_reset(out);
+       printbuf_tabstop_push(out, 28);
        out->atomic++;
 
        rcu_read_lock();