]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - cmd_debug.c
Update bcachefs sources to 9017d85854 bcachefs: btree_ptr_v2
[bcachefs-tools-debian] / cmd_debug.c
index 808226d9a352477ced91ad022bbaaf48680c1c84..8f8554361e25caddb00a5e71d687d48e6534e97f 100644 (file)
@@ -66,9 +66,10 @@ static void dump_one_device(struct bch_fs *c, struct bch_dev *ca, int fd)
                bch2_trans_init(&trans, c, 0, 0);
 
                for_each_btree_node(&trans, iter, i, POS_MIN, 0, b) {
-                       struct bkey_s_c_extent e = bkey_i_to_s_c_extent(&b->key);
+                       struct bkey_ptrs_c ptrs =
+                               bch2_bkey_ptrs_c(bkey_i_to_s_c(&b->key));
 
-                       extent_for_each_ptr(e, ptr)
+                       bkey_for_each_ptr(ptrs, ptr)
                                if (ptr->dev == ca->dev_idx)
                                        range_add(&data,
                                                  ptr->offset << 9,
@@ -94,6 +95,7 @@ int cmd_dump(int argc, char *argv[])
        opt_set(opts, norecovery,       true);
        opt_set(opts, degraded,         true);
        opt_set(opts, errors,           BCH_ON_ERROR_CONTINUE);
+       opt_set(opts, fix_errors,       FSCK_OPT_YES);
 
        while ((opt = getopt(argc, argv, "o:fh")) != -1)
                switch (opt) {