mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 11:33:28 +02:00
bcachefs: bch2_bio_to_text()
Pretty printer for struct bio, to be used for async object debugging. This is pretty minimal, we'll add more to it as we discover what we need. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
cca2c0d224
commit
5f0de475f9
|
|
@ -715,6 +715,16 @@ void bch2_corrupt_bio(struct bio *bio)
|
|||
}
|
||||
#endif
|
||||
|
||||
void bch2_bio_to_text(struct printbuf *out, struct bio *bio)
|
||||
{
|
||||
prt_printf(out, "bi_remaining:\t%u\n",
|
||||
atomic_read(&bio->__bi_remaining));
|
||||
prt_printf(out, "bi_end_io:\t%ps\n",
|
||||
bio->bi_end_io);
|
||||
prt_printf(out, "bi_status:\t%u\n",
|
||||
bio->bi_status);
|
||||
}
|
||||
|
||||
#if 0
|
||||
void eytzinger1_test(void)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -419,6 +419,8 @@ static inline void bch2_maybe_corrupt_bio(struct bio *bio, unsigned ratio)
|
|||
#define bch2_maybe_corrupt_bio(...) do {} while (0)
|
||||
#endif
|
||||
|
||||
void bch2_bio_to_text(struct printbuf *, struct bio *);
|
||||
|
||||
static inline void memcpy_u64s_small(void *dst, const void *src,
|
||||
unsigned u64s)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user