diff options
| author | Kent Overstreet <[email protected]> | 2025-04-18 18:56:09 +0000 |
|---|---|---|
| committer | Kent Overstreet <[email protected]> | 2025-05-22 00:14:27 +0000 |
| commit | f5241e41272858b983da45ac7f8a6ad58c4ba71f (patch) | |
| tree | 41896969272a866496b097c20d796921795a0307 /fs/bcachefs/btree_trans_commit.c | |
| parent | bcachefs: for_each_rw_member_rcu() (diff) | |
| download | kernel-f5241e41272858b983da45ac7f8a6ad58c4ba71f.tar.gz kernel-f5241e41272858b983da45ac7f8a6ad58c4ba71f.zip | |
bcachefs: enumerated_ref.c
Factor out the debug code for rw filesystem refs into a small library.
In release mode an enumerated ref is a normal percpu refcount, but in
debug mode all enumerated users of the ref get their own atomic_long_t
ref - making it much easier to chase down refcount usage bugs for when a
refcount has many users.
For debugging, we have enumerated_ref_to_text(), which prints the
current value of each different user.
Additionally, in debug mode enumerated_ref_stop() has a 10 second
timeout, after which it will dump outstanding refcounts.
Signed-off-by: Kent Overstreet <[email protected]>
Diffstat (limited to 'fs/bcachefs/btree_trans_commit.c')
0 files changed, 0 insertions, 0 deletions
