summaryrefslogtreecommitdiff
path: root/libbcachefs.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2018-11-12 19:20:40 -0500
committerKent Overstreet <kent.overstreet@gmail.com>2018-11-12 19:22:36 -0500
commitcc6479303f0672d5e07899009c64eb32821e170b (patch)
tree2aacceb0e1d623226c03703837386612ed8f76e1 /libbcachefs.c
parentbdba182d105b1eaa9776c78a094b0b0192046651 (diff)
Update bcachefs sources to a9f14c773f bcachefs: More btree gc refactorings
Diffstat (limited to 'libbcachefs.c')
-rw-r--r--libbcachefs.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/libbcachefs.c b/libbcachefs.c
index 968748a..98f058d 100644
--- a/libbcachefs.c
+++ b/libbcachefs.c
@@ -545,6 +545,26 @@ static void bch2_sb_print_crypt(struct bch_sb *sb, struct bch_sb_field *f,
BCH_KDF_SCRYPT_P(crypt));
}
+static void bch2_sb_print_replicas_v0(struct bch_sb *sb, struct bch_sb_field *f,
+ enum units units)
+{
+ struct bch_sb_field_replicas_v0 *replicas = field_to_type(f, replicas_v0);
+ struct bch_replicas_entry_v0 *e;
+ unsigned i;
+
+ for_each_replicas_entry(replicas, e) {
+ printf_pad(32, " %s:", bch2_data_types[e->data_type]);
+
+ putchar('[');
+ for (i = 0; i < e->nr_devs; i++) {
+ if (i)
+ putchar(' ');
+ printf("%u", e->devs[i]);
+ }
+ printf("]\n");
+ }
+}
+
static void bch2_sb_print_replicas(struct bch_sb *sb, struct bch_sb_field *f,
enum units units)
{
@@ -553,7 +573,10 @@ static void bch2_sb_print_replicas(struct bch_sb *sb, struct bch_sb_field *f,
unsigned i;
for_each_replicas_entry(replicas, e) {
- printf_pad(32, " %s:", bch2_data_types[e->data_type]);
+ printf_pad(32, " %s: %u/%u",
+ bch2_data_types[e->data_type],
+ e->nr_required,
+ e->nr_devs);
putchar('[');
for (i = 0; i < e->nr_devs; i++) {