Skip to content

Commit 2102bda

Browse files
author
Kent Overstreet
committed
bcachefs: Extra debug for data move path
We don't have sufficient information to debug: koverstreet/bcachefs#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: Kent Overstreet <[email protected]>
1 parent 47cdc7b commit 2102bda

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

fs/bcachefs/data_update.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,9 @@ void bch2_data_update_opts_to_text(struct printbuf *out, struct bch_fs *c,
475475
bch2_compression_opt_to_text(out, background_compression(*io_opts));
476476
prt_newline(out);
477477

478+
prt_str(out, "opts.replicas:\t");
479+
prt_u64(out, io_opts->data_replicas);
480+
478481
prt_str(out, "extra replicas:\t");
479482
prt_u64(out, data_opts->extra_replicas);
480483
}

fs/bcachefs/extents.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1017,6 +1017,8 @@ void bch2_extent_ptr_to_text(struct printbuf *out, struct bch_fs *c, const struc
10171017

10181018
prt_printf(out, "ptr: %u:%llu:%u gen %u",
10191019
ptr->dev, b, offset, ptr->gen);
1020+
if (ca->mi.durability != 1)
1021+
prt_printf(out, " d=%u", ca->mi.durability);
10201022
if (ptr->cached)
10211023
prt_str(out, " cached");
10221024
if (ptr->unwritten)

0 commit comments

Comments
 (0)