diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-08-14 14:44:17 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:38 -0400 |
commit | d0b50524f1d9b60318b92830546b45cd3325cfe2 (patch) | |
tree | 06b1e2c3ee3838177342d1139be73713e65a5cf9 /fs/bcachefs/util.h | |
parent | f0d2e9f2e511c137b75f15d0d13abd0217239253 (diff) | |
download | lwn-d0b50524f1d9b60318b92830546b45cd3325cfe2.tar.gz lwn-d0b50524f1d9b60318b92830546b45cd3325cfe2.zip |
bcachefs: bch2_bkey_packed_to_binary_text()
For debugging the eytzinger search tree code, and low level bkey packing
code, it can be helpful to see things in binary: this patch improves our
helpers for doing so.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/util.h')
-rw-r--r-- | fs/bcachefs/util.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/bcachefs/util.h b/fs/bcachefs/util.h index d5b19b1b2020..192d8b53f2ca 100644 --- a/fs/bcachefs/util.h +++ b/fs/bcachefs/util.h @@ -380,6 +380,8 @@ bool bch2_is_zero(const void *, size_t); u64 bch2_read_flag_list(char *, const char * const[]); +void bch2_prt_u64_binary(struct printbuf *, u64, unsigned); + #define NR_QUANTILES 15 #define QUANTILE_IDX(i) inorder_to_eytzinger0(i, NR_QUANTILES) #define QUANTILE_FIRST eytzinger0_first(NR_QUANTILES) |