diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-01-15 15:33:39 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-01-21 13:27:09 -0500 |
commit | 189c176c5dd324531d4cb23f172b1761e65bb0ed (patch) | |
tree | bfa5c0aecb418775eb736f0e40d962564112ea93 /fs/bcachefs/util.c | |
parent | ef740a1e2939376ea4cc11cc8b923214dc1f4a41 (diff) | |
download | linux-stable-189c176c5dd324531d4cb23f172b1761e65bb0ed.tar.gz linux-stable-189c176c5dd324531d4cb23f172b1761e65bb0ed.tar.bz2 linux-stable-189c176c5dd324531d4cb23f172b1761e65bb0ed.zip |
bcachefs: Improve move_extent tracepoint
Also print out the data_opts, so that we can see what specifically is
being done to an extent.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/util.c')
-rw-r--r-- | fs/bcachefs/util.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/bcachefs/util.c b/fs/bcachefs/util.c index f927c8a19e24..a135136adeee 100644 --- a/fs/bcachefs/util.c +++ b/fs/bcachefs/util.c @@ -241,12 +241,17 @@ bool bch2_is_zero(const void *_p, size_t n) return true; } -void bch2_prt_u64_binary(struct printbuf *out, u64 v, unsigned nr_bits) +void bch2_prt_u64_base2_nbits(struct printbuf *out, u64 v, unsigned nr_bits) { while (nr_bits) prt_char(out, '0' + ((v >> --nr_bits) & 1)); } +void bch2_prt_u64_base2(struct printbuf *out, u64 v) +{ + bch2_prt_u64_base2_nbits(out, v, fls64(v) ?: 1); +} + void bch2_print_string_as_lines(const char *prefix, const char *lines) { const char *p; |