Commit 0a84a066 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Also log device name in userspace

Change log messages in userspace to be closer to what they are in kernel
space, and include the device name - it's also useful in userspace.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
parent 85e95ca7
...@@ -218,8 +218,8 @@ ...@@ -218,8 +218,8 @@
#define bch2_fmt(_c, fmt) "bcachefs (%s): " fmt "\n", ((_c)->name) #define bch2_fmt(_c, fmt) "bcachefs (%s): " fmt "\n", ((_c)->name)
#define bch2_fmt_inum(_c, _inum, fmt) "bcachefs (%s inum %llu): " fmt "\n", ((_c)->name), (_inum) #define bch2_fmt_inum(_c, _inum, fmt) "bcachefs (%s inum %llu): " fmt "\n", ((_c)->name), (_inum)
#else #else
#define bch2_fmt(_c, fmt) fmt "\n" #define bch2_fmt(_c, fmt) "%s: " fmt "\n", ((_c)->name)
#define bch2_fmt_inum(_c, _inum, fmt) "inum %llu: " fmt "\n", (_inum) #define bch2_fmt_inum(_c, _inum, fmt) "%s inum %llu: " fmt "\n", ((_c)->name), (_inum)
#endif #endif
#define bch_info(c, fmt, ...) \ #define bch_info(c, fmt, ...) \
......
...@@ -1031,6 +1031,8 @@ int bch2_fs_recovery(struct bch_fs *c) ...@@ -1031,6 +1031,8 @@ int bch2_fs_recovery(struct bch_fs *c)
if (c->sb.clean) if (c->sb.clean)
bch_info(c, "recovering from clean shutdown, journal seq %llu", bch_info(c, "recovering from clean shutdown, journal seq %llu",
le64_to_cpu(clean->journal_seq)); le64_to_cpu(clean->journal_seq));
else
bch_info(c, "recovering from unclean shutdown");
if (!(c->sb.features & (1ULL << BCH_FEATURE_new_extent_overwrite))) { if (!(c->sb.features & (1ULL << BCH_FEATURE_new_extent_overwrite))) {
bch_err(c, "feature new_extent_overwrite not set, filesystem no longer supported"); bch_err(c, "feature new_extent_overwrite not set, filesystem no longer supported");
...@@ -1049,7 +1051,6 @@ int bch2_fs_recovery(struct bch_fs *c) ...@@ -1049,7 +1051,6 @@ int bch2_fs_recovery(struct bch_fs *c)
bch_err(c, "filesystem may have incompatible bkey formats; run fsck from the compat branch to fix"); bch_err(c, "filesystem may have incompatible bkey formats; run fsck from the compat branch to fix");
ret = -EINVAL; ret = -EINVAL;
goto err; goto err;
} }
if (!(c->sb.features & (1ULL << BCH_FEATURE_alloc_v2))) { if (!(c->sb.features & (1ULL << BCH_FEATURE_alloc_v2))) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment