summaryrefslogtreecommitdiff
path: root/fs/bcachefs/btree_iter.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/bcachefs/btree_iter.c')
-rw-r--r--fs/bcachefs/btree_iter.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/fs/bcachefs/btree_iter.c b/fs/bcachefs/btree_iter.c
index 761b09bfa7f7..5c5e14d1d360 100644
--- a/fs/bcachefs/btree_iter.c
+++ b/fs/bcachefs/btree_iter.c
@@ -651,14 +651,14 @@ err:
struct bkey uk = bkey_unpack_key(l->b, p);
bch2_bkey_to_text(&buf2, &uk);
} else {
- pr_buf(&buf2, "(none)");
+ prt_printf(&buf2, "(none)");
}
if (k) {
struct bkey uk = bkey_unpack_key(l->b, k);
bch2_bkey_to_text(&buf3, &uk);
} else {
- pr_buf(&buf3, "(none)");
+ prt_printf(&buf3, "(none)");
}
panic("path should be %s key at level %u:\n"
@@ -1842,30 +1842,30 @@ void bch2_trans_updates_to_text(struct printbuf *buf, struct btree_trans *trans)
{
struct btree_insert_entry *i;
- pr_buf(buf, "transaction updates for %s journal seq %llu",
+ prt_printf(buf, "transaction updates for %s journal seq %llu",
trans->fn, trans->journal_res.seq);
- pr_newline(buf);
- pr_indent_push(buf, 2);
+ prt_newline(buf);
+ printbuf_indent_add(buf, 2);
trans_for_each_update(trans, i) {
struct bkey_s_c old = { &i->old_k, i->old_v };
- pr_buf(buf, "update: btree=%s cached=%u %pS",
+ prt_printf(buf, "update: btree=%s cached=%u %pS",
bch2_btree_ids[i->btree_id],
i->cached,
(void *) i->ip_allocated);
- pr_newline(buf);
+ prt_newline(buf);
- pr_buf(buf, " old ");
+ prt_printf(buf, " old ");
bch2_bkey_val_to_text(buf, trans->c, old);
- pr_newline(buf);
+ prt_newline(buf);
- pr_buf(buf, " new ");
+ prt_printf(buf, " new ");
bch2_bkey_val_to_text(buf, trans->c, bkey_i_to_s_c(i->k));
- pr_newline(buf);
+ prt_newline(buf);
}
- pr_indent_pop(buf, 2);
+ printbuf_indent_sub(buf, 2);
}
noinline __cold
@@ -3378,7 +3378,7 @@ bch2_btree_path_node_to_text(struct printbuf *out,
struct btree_bkey_cached_common *_b,
bool cached)
{
- pr_buf(out, " l=%u %s:",
+ prt_printf(out, " l=%u %s:",
_b->level, bch2_btree_ids[_b->btree_id]);
bch2_bpos_to_text(out, btree_node_pos(_b, cached));
}
@@ -3406,28 +3406,28 @@ void bch2_btree_trans_to_text(struct printbuf *out, struct bch_fs *c)
if (!trans_has_locks(trans))
continue;
- pr_buf(out, "%i %s\n", trans->pid, trans->fn);
+ prt_printf(out, "%i %s\n", trans->pid, trans->fn);
trans_for_each_path(trans, path) {
if (!path->nodes_locked)
continue;
- pr_buf(out, " path %u %c l=%u %s:",
+ prt_printf(out, " path %u %c l=%u %s:",
path->idx,
path->cached ? 'c' : 'b',
path->level,
bch2_btree_ids[path->btree_id]);
bch2_bpos_to_text(out, path->pos);
- pr_buf(out, "\n");
+ prt_printf(out, "\n");
for (l = 0; l < BTREE_MAX_DEPTH; l++) {
if (btree_node_locked(path, l)) {
- pr_buf(out, " %s l=%u ",
+ prt_printf(out, " %s l=%u ",
btree_node_intent_locked(path, l) ? "i" : "r", l);
bch2_btree_path_node_to_text(out,
(void *) path->l[l].b,
path->cached);
- pr_buf(out, "\n");
+ prt_printf(out, "\n");
}
}
}
@@ -3435,7 +3435,7 @@ void bch2_btree_trans_to_text(struct printbuf *out, struct bch_fs *c)
b = READ_ONCE(trans->locking);
if (b) {
path = &trans->paths[trans->locking_path_idx];
- pr_buf(out, " locking path %u %c l=%u %c %s:",
+ prt_printf(out, " locking path %u %c l=%u %c %s:",
trans->locking_path_idx,
path->cached ? 'c' : 'b',
trans->locking_level,
@@ -3443,10 +3443,10 @@ void bch2_btree_trans_to_text(struct printbuf *out, struct bch_fs *c)
bch2_btree_ids[trans->locking_btree_id]);
bch2_bpos_to_text(out, trans->locking_pos);
- pr_buf(out, " node ");
+ prt_printf(out, " node ");
bch2_btree_path_node_to_text(out,
(void *) b, path->cached);
- pr_buf(out, "\n");
+ prt_printf(out, "\n");
}
}
mutex_unlock(&c->btree_trans_lock);