diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-01-12 09:14:47 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:09:23 +0300 |
commit | 12ce5b7df1e0e432bcac22079e4493cab5cd8b23 (patch) | |
tree | 26c734e453b9a614bc05dc7c42db3dd45affb479 /fs/bcachefs/trace.h | |
parent | f7b6ca23b6456b8b441b506ef977ff53972b35c2 (diff) | |
download | linux-12ce5b7df1e0e432bcac22079e4493cab5cd8b23.tar.xz |
bcachefs: Btree key cache coherency
- Updates to non key cache iterators will now be transparently
redirected to the key cache for cached btrees.
- Except when creating new keys: then the update goes to underlying
btree
For for iterating over a cached btree to work, we need to ensure that if
a key exists in the key cache, it also exists in the btree - otherwise
the iterator code will skip past it and not check the key cache.
Otherwise, for consistency, all updates should go to the same place -
the key cache.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/trace.h')
-rw-r--r-- | fs/bcachefs/trace.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/bcachefs/trace.h b/fs/bcachefs/trace.h index d432c90a1491..5e78c396e24c 100644 --- a/fs/bcachefs/trace.h +++ b/fs/bcachefs/trace.h @@ -658,6 +658,12 @@ DEFINE_EVENT(transaction_restart, trans_restart_mark_replicas, TP_ARGS(trans_fn, caller_ip) ); +DEFINE_EVENT(transaction_restart, trans_restart_key_cache_raced, + TP_PROTO(const char *trans_fn, + unsigned long caller_ip), + TP_ARGS(trans_fn, caller_ip) +); + DECLARE_EVENT_CLASS(transaction_restart_iter, TP_PROTO(const char *trans_fn, unsigned long caller_ip, |