}
continue;
nomatch:
+ trace_data_update_fail(&old.k->p);
+
if (m->ctxt) {
BUG_ON(k.k->p.offset <= iter.pos.offset);
atomic64_inc(&m->ctxt->stats->keys_raced);
w->inodes.nr = 0;
- for_each_btree_key(trans, iter, BTREE_ID_inodes, POS(0, inum),
+ for_each_btree_key_norestart(trans, iter, BTREE_ID_inodes, POS(0, inum),
BTREE_ITER_ALL_SNAPSHOTS, k, ret) {
u32 equiv = bch2_snapshot_equiv(c, k.k->p.snapshot);
}
}
fsck_err:
- if (ret) {
+ if (ret)
bch_err(c, "error from check_subdir_count(): %s", bch2_err_str(ret));
- return ret;
- }
- if (trans_was_restarted(trans, restart_count))
- return -BCH_ERR_transaction_restart_nested;
- return 0;
+ if (!ret && trans_was_restarted(trans, restart_count))
+ ret = -BCH_ERR_transaction_restart_nested;
+ return ret;
}
static int check_dirent_target(struct btree_trans *trans,
__entry->dst##_snapshot = (src).snapshot
DECLARE_EVENT_CLASS(bpos,
- TP_PROTO(struct bpos *p),
+ TP_PROTO(const struct bpos *p),
TP_ARGS(p),
TP_STRUCT__entry(
/* bset.c: */
DEFINE_EVENT(bpos, bkey_pack_pos_fail,
- TP_PROTO(struct bpos *p),
+ TP_PROTO(const struct bpos *p),
TP_ARGS(p)
);
__entry->wait_amount, __entry->until)
);
+DEFINE_EVENT(bpos, data_update_fail,
+ TP_PROTO(const struct bpos *p),
+ TP_ARGS(p)
+);
+
+/* btree transactions: */
+
DECLARE_EVENT_CLASS(transaction_event,
TP_PROTO(struct btree_trans *trans,
unsigned long caller_ip),