]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
bcachefs: Extra debug for data move path
authorKent Overstreet <kent.overstreet@linux.dev>
Sun, 18 Aug 2024 01:03:07 +0000 (21:03 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Tue, 20 Aug 2024 01:42:08 +0000 (21:42 -0400)
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: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/data_update.c
fs/bcachefs/extents.c

index 6a854c9184965e6754f3378a440a52c3193b4a4d..1ca628e93e87f163f2bdf6cdd69e737383877900 100644 (file)
@@ -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));
        prt_newline(out);
 
+       prt_str(out, "opts.replicas:\t");
+       prt_u64(out, io_opts->data_replicas);
+
        prt_str(out, "extra replicas:\t");
        prt_u64(out, data_opts->extra_replicas);
 }
index 4419ad3e454e4f4fe9eacf0bbed6f028895eae6d..9406f82fc2550b3f1b9430a9ff10d40deb2a4617 100644 (file)
@@ -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",
                           ptr->dev, b, offset, ptr->gen);
+               if (ca->mi.durability != 1)
+                       prt_printf(out, " d=%u", ca->mi.durability);
                if (ptr->cached)
                        prt_str(out, " cached");
                if (ptr->unwritten)