diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-03-31 05:25:45 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-04-03 21:44:18 +0300 |
commit | 27fcec6c27caec05a512d2f1be7f855d8899cb8d (patch) | |
tree | c111892700954d3585e137ed2a23ac001d53a8a8 /fs/bcachefs/util.h | |
parent | fa14b50460baba40c8b1138c517fb8cf04464292 (diff) | |
download | linux-27fcec6c27caec05a512d2f1be7f855d8899cb8d.tar.xz |
bcachefs: Clear recovery_passes_required as they complete without errors
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/util.h')
-rw-r--r-- | fs/bcachefs/util.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/bcachefs/util.h b/fs/bcachefs/util.h index 175aee3074c7..4577c0789a3a 100644 --- a/fs/bcachefs/util.h +++ b/fs/bcachefs/util.h @@ -797,4 +797,14 @@ static inline void __set_bit_le64(size_t bit, __le64 *addr) addr[bit / 64] |= cpu_to_le64(BIT_ULL(bit % 64)); } +static inline void __clear_bit_le64(size_t bit, __le64 *addr) +{ + addr[bit / 64] &= !cpu_to_le64(BIT_ULL(bit % 64)); +} + +static inline bool test_bit_le64(size_t bit, __le64 *addr) +{ + return (addr[bit / 64] & cpu_to_le64(BIT_ULL(bit % 64))) != 0; +} + #endif /* _BCACHEFS_UTIL_H */ |