Commit 2102bdac authored by Kent Overstreet's avatar Kent Overstreet

bcachefs: Extra debug for data move path

We don't have sufficient information to debug:

https://github.com/koverstreet/bcachefs/issues/726

- print out durability of extent ptrs, when non default
- print the number of replicas we need in data_update_to_text()
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 47cdc7b1
...@@ -475,6 +475,9 @@ void bch2_data_update_opts_to_text(struct printbuf *out, struct bch_fs *c, ...@@ -475,6 +475,9 @@ void bch2_data_update_opts_to_text(struct printbuf *out, struct bch_fs *c,
bch2_compression_opt_to_text(out, background_compression(*io_opts)); bch2_compression_opt_to_text(out, background_compression(*io_opts));
prt_newline(out); prt_newline(out);
prt_str(out, "opts.replicas:\t");
prt_u64(out, io_opts->data_replicas);
prt_str(out, "extra replicas:\t"); prt_str(out, "extra replicas:\t");
prt_u64(out, data_opts->extra_replicas); prt_u64(out, data_opts->extra_replicas);
} }
......
...@@ -1017,6 +1017,8 @@ void bch2_extent_ptr_to_text(struct printbuf *out, struct bch_fs *c, const struc ...@@ -1017,6 +1017,8 @@ void bch2_extent_ptr_to_text(struct printbuf *out, struct bch_fs *c, const struc
prt_printf(out, "ptr: %u:%llu:%u gen %u", prt_printf(out, "ptr: %u:%llu:%u gen %u",
ptr->dev, b, offset, ptr->gen); ptr->dev, b, offset, ptr->gen);
if (ca->mi.durability != 1)
prt_printf(out, " d=%u", ca->mi.durability);
if (ptr->cached) if (ptr->cached)
prt_str(out, " cached"); prt_str(out, " cached");
if (ptr->unwritten) if (ptr->unwritten)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment