diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-05-04 00:07:40 +0200 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-05-08 23:29:22 +0200 |
commit | 552aa5486579c18b4f8e7ca03ef88fa573c517b5 (patch) | |
tree | c64a06534b0b4de946fababe7f7800347172298c /fs/bcachefs/bcachefs.h | |
parent | bcachefs: New helpers for device refcounts (diff) | |
download | linux-552aa5486579c18b4f8e7ca03ef88fa573c517b5.tar.xz linux-552aa5486579c18b4f8e7ca03ef88fa573c517b5.zip |
bcachefs: Debug asserts for ca->ref
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/bcachefs.h')
-rw-r--r-- | fs/bcachefs/bcachefs.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/bcachefs/bcachefs.h b/fs/bcachefs/bcachefs.h index 82544f826c58..f5ba8c6a34d7 100644 --- a/fs/bcachefs/bcachefs.h +++ b/fs/bcachefs/bcachefs.h @@ -537,7 +537,13 @@ struct io_count { struct bch_dev { struct kobject kobj; +#ifdef CONFIG_BCACHEFS_DEBUG + atomic_long_t ref; + bool dying; + unsigned long last_put; +#else struct percpu_ref ref; +#endif struct completion ref_completion; struct percpu_ref io_ref; struct completion io_ref_completion; |