diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-05-03 18:07:40 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-05-08 17:29:22 -0400 |
commit | 552aa5486579c18b4f8e7ca03ef88fa573c517b5 (patch) | |
tree | c64a06534b0b4de946fababe7f7800347172298c /fs/bcachefs/bcachefs.h | |
parent | f295298b8c6413f0ed2a5a69dd7f32409cc54f1d (diff) |
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; |