bcachefs: Print version, options earlier in startup path
authorKent Overstreet <kent.overstreet@linux.dev>
Thu, 20 Jul 2023 22:09:26 +0000 (18:09 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:10:08 +0000 (17:10 -0400)
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/super.c

index 63e9dafa83957270ff5e7b8a5fbbca4a7d1f4f4e..c17fdcd0839040e3d879266b221e54b9f6456563 100644 (file)
@@ -883,7 +883,7 @@ static void print_mount_opts(struct bch_fs *c)
        struct printbuf p = PRINTBUF;
        bool first = true;
 
-       prt_str(&p, "mounted version ");
+       prt_str(&p, "mounting version ");
        bch2_version_to_text(&p, c->sb.version);
 
        if (c->opts.read_only) {
@@ -919,6 +919,8 @@ int bch2_fs_start(struct bch_fs *c)
        unsigned i;
        int ret;
 
+       print_mount_opts(c);
+
        down_write(&c->state_lock);
 
        BUG_ON(test_bit(BCH_FS_STARTED, &c->flags));
@@ -972,7 +974,6 @@ int bch2_fs_start(struct bch_fs *c)
                        goto err;
        }
 
-       print_mount_opts(c);
        ret = 0;
 out:
        up_write(&c->state_lock);