Improve some log messages

This commit is contained in:
Kent Overstreet 2020-11-13 16:24:12 -05:00
parent 4df03a2ead
commit 4915b450e2
2 changed files with 13 additions and 4 deletions

View File

@ -317,8 +317,10 @@ static void print_node_ondisk(struct bch_fs *c, struct btree *b)
sectors = vstruct_sectors(bne, c->block_bits);
}
fprintf(stdout, " offset %u journal seq %llu\n",
offset, le64_to_cpu(i->journal_seq));
fprintf(stdout, " offset %u version %u, journal seq %llu\n",
offset,
le16_to_cpu(i->version),
le64_to_cpu(i->journal_seq));
offset += sectors;
for (k = i->start;
@ -574,7 +576,7 @@ int cmd_list_journal(int argc, char *argv[])
" write clock %8u\n"
,
le64_to_cpu(p->j.seq),
le32_to_cpu(p->j.seq),
le32_to_cpu(p->j.version),
le64_to_cpu(p->j.last_seq),
le16_to_cpu(p->j.read_clock),
le16_to_cpu(p->j.write_clock));

View File

@ -619,6 +619,13 @@ static void bch2_sb_print_disk_groups(struct bch_sb *sb, struct bch_sb_field *f,
static void bch2_sb_print_clean(struct bch_sb *sb, struct bch_sb_field *f,
enum units units)
{
struct bch_sb_field_clean *clean = field_to_type(f, clean);
printf(" flags: %x", le32_to_cpu(clean->flags));
printf(" read clock: %x", le16_to_cpu(clean->read_clock));
printf(" write clock: %x", le16_to_cpu(clean->write_clock));
printf(" journal seq: %llx", le64_to_cpu(clean->journal_seq));
}
static void bch2_sb_print_journal_seq_blacklist(struct bch_sb *sb, struct bch_sb_field *f,
@ -669,7 +676,7 @@ void bch2_sb_print(struct bch_sb *sb, bool print_layout,
{
struct bch_sb_field_members *mi;
char user_uuid_str[40], internal_uuid_str[40];
char features_str[200];
char features_str[500];
char fields_have_str[200];
char label[BCH_SB_LABEL_SIZE + 1];
char time_str[64];