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,
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) {