mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-25 10:19:47 +00:00
bcachefs: Improve tracepoints slightly in commit path
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
6876d2ab78
commit
65d9f536fa
1 changed files with 12 additions and 4 deletions
|
@ -706,10 +706,18 @@ int __bch2_trans_commit(struct btree_trans *trans)
|
||||||
trans_trigger_run = false;
|
trans_trigger_run = false;
|
||||||
|
|
||||||
trans_for_each_update(trans, i) {
|
trans_for_each_update(trans, i) {
|
||||||
/* we know trans->nounlock won't be set here: */
|
if (unlikely(i->iter->uptodate > BTREE_ITER_NEED_PEEK)) {
|
||||||
if (unlikely(!(i->iter->locks_want < 1
|
trace_trans_restart_traverse(trans->ip);
|
||||||
? __bch2_btree_iter_upgrade(i->iter, 1)
|
ret = -EINTR;
|
||||||
: i->iter->uptodate <= BTREE_ITER_NEED_PEEK))) {
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* We're not using bch2_btree_iter_upgrade here because
|
||||||
|
* we know trans->nounlock can't be set:
|
||||||
|
*/
|
||||||
|
if (unlikely(i->iter->locks_want < 1 &&
|
||||||
|
!__bch2_btree_iter_upgrade(i->iter, 1))) {
|
||||||
trace_trans_restart_upgrade(trans->ip);
|
trace_trans_restart_upgrade(trans->ip);
|
||||||
ret = -EINTR;
|
ret = -EINTR;
|
||||||
goto out;
|
goto out;
|
||||||
|
|
Loading…
Reference in a new issue