summaryrefslogtreecommitdiff
path: root/fs/bcachefs/util.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2022-08-14 21:44:17 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:09:38 +0300
commitd0b50524f1d9b60318b92830546b45cd3325cfe2 (patch)
tree06b1e2c3ee3838177342d1139be73713e65a5cf9 /fs/bcachefs/util.h
parentf0d2e9f2e511c137b75f15d0d13abd0217239253 (diff)
downloadlinux-d0b50524f1d9b60318b92830546b45cd3325cfe2.tar.xz
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.h2
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)