bcachefs: Print devices we're mounting on multi device filesystems
Previously, we only ever logged the filesystem UUID. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
+12
-4
@@ -1067,12 +1067,13 @@ noinline_for_stack
|
|||||||
static void print_mount_opts(struct bch_fs *c)
|
static void print_mount_opts(struct bch_fs *c)
|
||||||
{
|
{
|
||||||
enum bch_opt_id i;
|
enum bch_opt_id i;
|
||||||
struct printbuf p = PRINTBUF;
|
CLASS(printbuf, p)();
|
||||||
bool first = true;
|
bch2_log_msg_start(c, &p);
|
||||||
|
|
||||||
prt_str(&p, "starting version ");
|
prt_str(&p, "starting version ");
|
||||||
bch2_version_to_text(&p, c->sb.version);
|
bch2_version_to_text(&p, c->sb.version);
|
||||||
|
|
||||||
|
bool first = true;
|
||||||
for (i = 0; i < bch2_opts_nr; i++) {
|
for (i = 0; i < bch2_opts_nr; i++) {
|
||||||
const struct bch_option *opt = &bch2_opt_table[i];
|
const struct bch_option *opt = &bch2_opt_table[i];
|
||||||
u64 v = bch2_opt_get_by_id(&c->opts, i);
|
u64 v = bch2_opt_get_by_id(&c->opts, i);
|
||||||
@@ -1098,8 +1099,15 @@ static void print_mount_opts(struct bch_fs *c)
|
|||||||
prt_bitflags(&p, bch2_sb_features, c->sb.features);
|
prt_bitflags(&p, bch2_sb_features, c->sb.features);
|
||||||
}
|
}
|
||||||
|
|
||||||
bch_info(c, "%s", p.buf);
|
if (c->sb.multi_device) {
|
||||||
printbuf_exit(&p);
|
prt_printf(&p, "\nwith devices");
|
||||||
|
for_each_online_member(c, ca, BCH_DEV_READ_REF_bch2_online_devs) {
|
||||||
|
prt_char(&p, ' ');
|
||||||
|
prt_str(&p, ca->name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bch2_print_str(c, KERN_INFO, p.buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool bch2_fs_may_start(struct bch_fs *c)
|
static bool bch2_fs_may_start(struct bch_fs *c)
|
||||||
|
|||||||
Reference in New Issue
Block a user