bcachefs: Improve inode_to_text()

Add line breaks - inode_to_text() is now much easier to read.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>

Changed files
+18 -7
fs
bcachefs
+18 -7
fs/bcachefs/inode.c
··· 506 506 static void __bch2_inode_unpacked_to_text(struct printbuf *out, 507 507 struct bch_inode_unpacked *inode) 508 508 { 509 - prt_printf(out, "mode=%o ", inode->bi_mode); 509 + printbuf_indent_add(out, 2); 510 + prt_printf(out, "mode=%o", inode->bi_mode); 511 + prt_newline(out); 510 512 511 513 prt_str(out, "flags="); 512 514 prt_bitflags(out, bch2_inode_flag_strs, inode->bi_flags & ((1U << 20) - 1)); 513 515 prt_printf(out, " (%x)", inode->bi_flags); 516 + prt_newline(out); 514 517 515 - prt_printf(out, " journal_seq=%llu bi_size=%llu bi_sectors=%llu bi_version=%llu", 516 - inode->bi_journal_seq, 517 - inode->bi_size, 518 - inode->bi_sectors, 519 - inode->bi_version); 518 + prt_printf(out, "journal_seq=%llu", inode->bi_journal_seq); 519 + prt_newline(out); 520 + 521 + prt_printf(out, "bi_size=%llu", inode->bi_size); 522 + prt_newline(out); 523 + 524 + prt_printf(out, "bi_sectors=%llu", inode->bi_sectors); 525 + prt_newline(out); 526 + 527 + prt_newline(out); 528 + prt_printf(out, "bi_version=%llu", inode->bi_version); 520 529 521 530 #define x(_name, _bits) \ 522 - prt_printf(out, " "#_name "=%llu", (u64) inode->_name); 531 + prt_printf(out, #_name "=%llu", (u64) inode->_name); \ 532 + prt_newline(out); 523 533 BCH_INODE_FIELDS_v3() 524 534 #undef x 535 + printbuf_indent_sub(out, 2); 525 536 } 526 537 527 538 void bch2_inode_unpacked_to_text(struct printbuf *out, struct bch_inode_unpacked *inode)