diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-02-19 05:20:18 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:09:53 +0300 |
commit | 5e2d8be8bd7985aa590dcccec14fb38fb529b3f0 (patch) | |
tree | d6c88a22313a63a697b3700f1ab48d74c3e08937 /fs/bcachefs/btree_iter.c | |
parent | 73d86dfd888541fd85f7e4d03c898f2ad8486196 (diff) | |
download | linux-5e2d8be8bd7985aa590dcccec14fb38fb529b3f0.tar.xz |
bcachefs: Split trans->last_begin_ip and trans->last_restarted_ip
These are two different things - this improves our debug assert
messages.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/btree_iter.c')
-rw-r--r-- | fs/bcachefs/btree_iter.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/bcachefs/btree_iter.c b/fs/bcachefs/btree_iter.c index 5ab22c4c2b2e..63213205a043 100644 --- a/fs/bcachefs/btree_iter.c +++ b/fs/bcachefs/btree_iter.c @@ -976,6 +976,7 @@ static int bch2_btree_path_traverse_all(struct btree_trans *trans) trans->in_traverse_all = true; retry_all: trans->restarted = 0; + trans->last_restarted_ip = 0; trans_for_each_path(trans, path) path->should_be_locked = false; @@ -1360,7 +1361,7 @@ void __noreturn bch2_trans_restart_error(struct btree_trans *trans, u32 restart_ { panic("trans->restart_count %u, should be %u, last restarted by %pS\n", trans->restart_count, restart_count, - (void *) trans->last_restarted_ip); + (void *) trans->last_begin_ip); } void __noreturn bch2_trans_in_restart_error(struct btree_trans *trans) @@ -2865,7 +2866,7 @@ u32 bch2_trans_begin(struct btree_trans *trans) if (unlikely(time_after(jiffies, trans->srcu_lock_time + msecs_to_jiffies(10)))) bch2_trans_reset_srcu_lock(trans); - trans->last_restarted_ip = _RET_IP_; + trans->last_begin_ip = _RET_IP_; if (trans->restarted) { bch2_btree_path_traverse_all(trans); trans->notrace_relock_fail = false; |