summaryrefslogtreecommitdiff
path: root/fs/bcachefs/alloc_background.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/bcachefs/alloc_background.c')
-rw-r--r--fs/bcachefs/alloc_background.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/fs/bcachefs/alloc_background.c b/fs/bcachefs/alloc_background.c
index 32ebf6cc9e07..d114ba0949a8 100644
--- a/fs/bcachefs/alloc_background.c
+++ b/fs/bcachefs/alloc_background.c
@@ -300,7 +300,7 @@ int bch2_alloc_v1_invalid(const struct bch_fs *c, struct bkey_s_c k,
/* allow for unknown fields */
if (bkey_val_u64s(a.k) < bch_alloc_v1_val_u64s(a.v)) {
- pr_buf(err, "incorrect value size (%zu < %u)",
+ prt_printf(err, "incorrect value size (%zu < %u)",
bkey_val_u64s(a.k), bch_alloc_v1_val_u64s(a.v));
return -EINVAL;
}
@@ -314,7 +314,7 @@ int bch2_alloc_v2_invalid(const struct bch_fs *c, struct bkey_s_c k,
struct bkey_alloc_unpacked u;
if (bch2_alloc_unpack_v2(&u, k)) {
- pr_buf(err, "unpack error");
+ prt_printf(err, "unpack error");
return -EINVAL;
}
@@ -327,7 +327,7 @@ int bch2_alloc_v3_invalid(const struct bch_fs *c, struct bkey_s_c k,
struct bkey_alloc_unpacked u;
if (bch2_alloc_unpack_v3(&u, k)) {
- pr_buf(err, "unpack error");
+ prt_printf(err, "unpack error");
return -EINVAL;
}
@@ -340,14 +340,14 @@ int bch2_alloc_v4_invalid(const struct bch_fs *c, struct bkey_s_c k,
struct bkey_s_c_alloc_v4 a = bkey_s_c_to_alloc_v4(k);
if (bkey_val_bytes(k.k) != sizeof(struct bch_alloc_v4)) {
- pr_buf(err, "bad val size (%zu != %zu)",
+ prt_printf(err, "bad val size (%zu != %zu)",
bkey_val_bytes(k.k), sizeof(struct bch_alloc_v4));
return -EINVAL;
}
if (rw == WRITE) {
if (alloc_data_type(*a.v, a.v->data_type) != a.v->data_type) {
- pr_buf(err, "invalid data type (got %u should be %u)",
+ prt_printf(err, "invalid data type (got %u should be %u)",
a.v->data_type, alloc_data_type(*a.v, a.v->data_type));
return -EINVAL;
}
@@ -359,7 +359,7 @@ int bch2_alloc_v4_invalid(const struct bch_fs *c, struct bkey_s_c k,
if (a.v->dirty_sectors ||
a.v->cached_sectors ||
a.v->stripe) {
- pr_buf(err, "empty data type free but have data");
+ prt_printf(err, "empty data type free but have data");
return -EINVAL;
}
break;
@@ -369,7 +369,7 @@ int bch2_alloc_v4_invalid(const struct bch_fs *c, struct bkey_s_c k,
case BCH_DATA_user:
case BCH_DATA_parity:
if (!a.v->dirty_sectors) {
- pr_buf(err, "data_type %s but dirty_sectors==0",
+ prt_printf(err, "data_type %s but dirty_sectors==0",
bch2_data_types[a.v->data_type]);
return -EINVAL;
}
@@ -378,19 +378,19 @@ int bch2_alloc_v4_invalid(const struct bch_fs *c, struct bkey_s_c k,
if (!a.v->cached_sectors ||
a.v->dirty_sectors ||
a.v->stripe) {
- pr_buf(err, "data type inconsistency");
+ prt_printf(err, "data type inconsistency");
return -EINVAL;
}
if (!a.v->io_time[READ] &&
test_bit(BCH_FS_CHECK_ALLOC_TO_LRU_REFS_DONE, &c->flags)) {
- pr_buf(err, "cached bucket with read_time == 0");
+ prt_printf(err, "cached bucket with read_time == 0");
return -EINVAL;
}
break;
case BCH_DATA_stripe:
if (!a.v->stripe) {
- pr_buf(err, "data_type %s but stripe==0",
+ prt_printf(err, "data_type %s but stripe==0",
bch2_data_types[a.v->data_type]);
return -EINVAL;
}
@@ -421,17 +421,17 @@ void bch2_alloc_to_text(struct printbuf *out, struct bch_fs *c, struct bkey_s_c
bch2_alloc_to_v4(k, &a);
- pr_buf(out, "gen %u oldest_gen %u data_type %s journal_seq %llu need_discard %llu need_inc_gen %llu",
+ prt_printf(out, "gen %u oldest_gen %u data_type %s journal_seq %llu need_discard %llu need_inc_gen %llu",
a.gen, a.oldest_gen, bch2_data_types[a.data_type],
a.journal_seq,
BCH_ALLOC_V4_NEED_DISCARD(&a),
BCH_ALLOC_V4_NEED_INC_GEN(&a));
- pr_buf(out, " dirty_sectors %u", a.dirty_sectors);
- pr_buf(out, " cached_sectors %u", a.cached_sectors);
- pr_buf(out, " stripe %u", a.stripe);
- pr_buf(out, " stripe_redundancy %u", a.stripe_redundancy);
- pr_buf(out, " read_time %llu", a.io_time[READ]);
- pr_buf(out, " write_time %llu", a.io_time[WRITE]);
+ prt_printf(out, " dirty_sectors %u", a.dirty_sectors);
+ prt_printf(out, " cached_sectors %u", a.cached_sectors);
+ prt_printf(out, " stripe %u", a.stripe);
+ prt_printf(out, " stripe_redundancy %u", a.stripe_redundancy);
+ prt_printf(out, " read_time %llu", a.io_time[READ]);
+ prt_printf(out, " write_time %llu", a.io_time[WRITE]);
}
int bch2_alloc_read(struct bch_fs *c)
@@ -1098,7 +1098,7 @@ next_lru:
goto out;
if (k.k->type != KEY_TYPE_lru) {
- pr_buf(&buf, "non lru key in lru btree:\n ");
+ prt_printf(&buf, "non lru key in lru btree:\n ");
bch2_bkey_val_to_text(&buf, c, k);
if (!test_bit(BCH_FS_CHECK_LRUS_DONE, &c->flags)) {
@@ -1122,9 +1122,9 @@ next_lru:
goto out;
if (idx != alloc_lru_idx(a->v)) {
- pr_buf(&buf, "alloc key does not point back to lru entry when invalidating bucket:\n ");
+ prt_printf(&buf, "alloc key does not point back to lru entry when invalidating bucket:\n ");
bch2_bkey_val_to_text(&buf, c, bkey_i_to_s_c(&a->k_i));
- pr_buf(&buf, "\n ");
+ prt_printf(&buf, "\n ");
bch2_bkey_val_to_text(&buf, c, k);
if (!test_bit(BCH_FS_CHECK_LRUS_DONE, &c->flags)) {