diff options
author | 2024-01-05 13:03:01 -0500 | |
---|---|---|
committer | 2024-01-05 23:24:21 -0500 | |
commit | 5e448c48932b578e7548d7df0f8bfb46eb29fbfc (patch) | |
tree | 45fcc551d06ca60d277d8be89b72db6f1a677208 | |
parent | bcachefs: __bch2_sb_field_to_text() (diff) | |
download | linux-5e448c48932b578e7548d7df0f8bfb46eb29fbfc.tar.gz linux-5e448c48932b578e7548d7df0f8bfb46eb29fbfc.tar.bz2 linux-5e448c48932b578e7548d7df0f8bfb46eb29fbfc.zip |
bcachefs: print sb magic when relevant
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r-- | fs/bcachefs/super-io.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/bcachefs/super-io.c b/fs/bcachefs/super-io.c index ea86921727b4..b05c5f1fe09d 100644 --- a/fs/bcachefs/super-io.c +++ b/fs/bcachefs/super-io.c @@ -628,7 +628,9 @@ reread: if (!uuid_equal(&sb->sb->magic, &BCACHE_MAGIC) && !uuid_equal(&sb->sb->magic, &BCHFS_MAGIC)) { - prt_printf(err, "Not a bcachefs superblock"); + prt_str(err, "Not a bcachefs superblock (got magic "); + pr_uuid(err, sb->sb->magic.b); + prt_str(err, ")"); return -BCH_ERR_invalid_sb_magic; } @@ -1261,6 +1263,11 @@ void bch2_sb_to_text(struct printbuf *out, struct bch_sb *sb, pr_uuid(out, sb->uuid.b); prt_newline(out); + prt_printf(out, "Magic number:"); + prt_tab(out); + pr_uuid(out, sb->magic.b); + prt_newline(out); + prt_str(out, "Device index:"); prt_tab(out); prt_printf(out, "%u", sb->dev_idx); |