diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-04-17 02:08:10 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-04-17 02:08:19 -0400 |
commit | a0da3c91d439b402b0c11d44dd57158dfefbe84a (patch) | |
tree | b26fbf6ace7d3ceb9cb09de4c99bc36110005dd0 /libbcachefs/sb-counters.c | |
parent | c824bbe69db5d7ff5722033af1dcd01f41348206 (diff) |
Update bcachefs sources to ff6fd3ef0cd0 bcachefs: Check for writing btree_ptr_v2.sectors_written == 0testing
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'libbcachefs/sb-counters.c')
-rw-r--r-- | libbcachefs/sb-counters.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/libbcachefs/sb-counters.c b/libbcachefs/sb-counters.c index 7dc89876..8dfb16d7 100644 --- a/libbcachefs/sb-counters.c +++ b/libbcachefs/sb-counters.c @@ -31,19 +31,12 @@ static void bch2_sb_counters_to_text(struct printbuf *out, struct bch_sb *sb, struct bch_sb_field *f) { struct bch_sb_field_counters *ctrs = field_to_type(f, counters); - unsigned int i; unsigned int nr = bch2_sb_counter_nr_entries(ctrs); - for (i = 0; i < nr; i++) { - if (i < BCH_COUNTER_NR) - prt_printf(out, "%s ", bch2_counter_names[i]); - else - prt_printf(out, "(unknown)"); - - prt_tab(out); - prt_printf(out, "%llu", le64_to_cpu(ctrs->d[i])); - prt_newline(out); - } + for (unsigned i = 0; i < nr; i++) + prt_printf(out, "%s\t%llu\n", + i < BCH_COUNTER_NR ? bch2_counter_names[i] : "(unknown)", + le64_to_cpu(ctrs->d[i])); }; int bch2_sb_counters_to_cpu(struct bch_fs *c) |