diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-07-17 23:06:38 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:37 -0400 |
commit | 549d173c1bd9b58c2ad41217522462e012a6545f (patch) | |
tree | 9bf146d761ae1f81ba18ec45a1bda63cb47549eb /fs/bcachefs/errcode.h | |
parent | 0990efaeeab14de1e3e3bf2791808afebadd1cc4 (diff) | |
download | linux-549d173c1bd9b58c2ad41217522462e012a6545f.tar.gz linux-549d173c1bd9b58c2ad41217522462e012a6545f.tar.bz2 linux-549d173c1bd9b58c2ad41217522462e012a6545f.zip |
bcachefs: EINTR -> BCH_ERR_transaction_restart
Now that we have error codes, with subtypes, we can switch to our own
error code for transaction restarts - and even better, a distinct error
code for each transaction restart reason: clearer code and better
debugging.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/errcode.h')
-rw-r--r-- | fs/bcachefs/errcode.h | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/fs/bcachefs/errcode.h b/fs/bcachefs/errcode.h index 69cc7cdd1c06..7972b018d2d0 100644 --- a/fs/bcachefs/errcode.h +++ b/fs/bcachefs/errcode.h @@ -7,7 +7,30 @@ x(0, freelist_empty) \ x(freelist_empty, no_buckets_found) \ x(0, insufficient_devices) \ - x(0, need_snapshot_cleanup) + x(0, need_snapshot_cleanup) \ + x(0, transaction_restart) \ + x(transaction_restart, transaction_restart_fault_inject) \ + x(transaction_restart, transaction_restart_relock) \ + x(transaction_restart, transaction_restart_relock_path) \ + x(transaction_restart, transaction_restart_relock_path_intent) \ + x(transaction_restart, transaction_restart_relock_after_fill) \ + x(transaction_restart, transaction_restart_too_many_iters) \ + x(transaction_restart, transaction_restart_lock_node_reused) \ + x(transaction_restart, transaction_restart_fill_relock) \ + x(transaction_restart, transaction_restart_fill_mem_alloc_fail)\ + x(transaction_restart, transaction_restart_mem_realloced) \ + x(transaction_restart, transaction_restart_in_traverse_all) \ + 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_fill) \ + x(transaction_restart, transaction_restart_key_cache_raced) \ + x(transaction_restart, transaction_restart_key_cache_realloced)\ + x(transaction_restart, transaction_restart_journal_preres_get) \ + x(transaction_restart, transaction_restart_nested) \ + x(0, lock_fail_node_reused) \ + x(0, lock_fail_root_changed) \ + x(0, journal_reclaim_would_deadlock) enum bch_errcode { BCH_ERR_START = 2048, |