mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-17 18:56:24 +00:00
bcachefs: print sb magic when relevant
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
5b88365660
commit
5e448c4893
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user