bcachefs: Add distinct error code for key_cache_upgrade

This aids in debugging.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
This commit is contained in:
Kent Overstreet 2022-08-04 12:46:37 -04:00 committed by Kent Overstreet
parent 4a7f7e9e4d
commit ae33e7a274
2 changed files with 2 additions and 1 deletions

View File

@ -417,7 +417,7 @@ fill:
if (!path->locks_want &&
!__bch2_btree_path_upgrade(trans, path, 1)) {
trace_transaction_restart_ip(trans->fn, _THIS_IP_);
ret = btree_trans_restart(trans, BCH_ERR_transaction_restart_upgrade);
ret = btree_trans_restart(trans, BCH_ERR_transaction_restart_key_cache_upgrade);
goto err;
}

View File

@ -22,6 +22,7 @@
x(transaction_restart, transaction_restart_would_deadlock) \
x(transaction_restart, transaction_restart_would_deadlock_write)\
x(transaction_restart, transaction_restart_upgrade) \
x(transaction_restart, transaction_restart_key_cache_upgrade) \
x(transaction_restart, transaction_restart_key_cache_fill) \
x(transaction_restart, transaction_restart_key_cache_raced) \
x(transaction_restart, transaction_restart_key_cache_realloced)\