Skip to content

Commit f0ac63f

Browse files
ksawaraykdave
authored andcommitted
btrfs: restore mount option info messages during mount
After the fsconfig migration in 6.8, mount option info messages are no longer displayed during mount operations because btrfs_emit_options() is only called during remount, not during initial mount. Fix this by calling btrfs_emit_options() in btrfs_fill_super() after open_ctree() succeeds. Additionally, prevent log duplication by ensuring btrfs_check_options() handles validation with warn-level and err-level messages, while btrfs_emit_options() provides info-level messages. Fixes: eddb1a4 ("btrfs: add reconfigure callback for fs_context") CC: [email protected] # 6.8+ Reviewed-by: Qu Wenruo <[email protected]> Signed-off-by: Kyoji Ogasawara <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent 3273749 commit f0ac63f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

fs/btrfs/super.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ struct btrfs_fs_context {
8888
refcount_t refs;
8989
};
9090

91+
static void btrfs_emit_options(struct btrfs_fs_info *info,
92+
struct btrfs_fs_context *old);
93+
9194
enum {
9295
Opt_acl,
9396
Opt_clear_cache,
@@ -698,12 +701,9 @@ bool btrfs_check_options(const struct btrfs_fs_info *info,
698701

699702
if (!test_bit(BTRFS_FS_STATE_REMOUNTING, &info->fs_state)) {
700703
if (btrfs_raw_test_opt(*mount_opt, SPACE_CACHE)) {
701-
btrfs_info(info, "disk space caching is enabled");
702704
btrfs_warn(info,
703705
"space cache v1 is being deprecated and will be removed in a future release, please use -o space_cache=v2");
704706
}
705-
if (btrfs_raw_test_opt(*mount_opt, FREE_SPACE_TREE))
706-
btrfs_info(info, "using free-space-tree");
707707
}
708708

709709
return ret;
@@ -980,6 +980,8 @@ static int btrfs_fill_super(struct super_block *sb,
980980
return ret;
981981
}
982982

983+
btrfs_emit_options(fs_info, NULL);
984+
983985
inode = btrfs_iget(BTRFS_FIRST_FREE_OBJECTID, fs_info->fs_root);
984986
if (IS_ERR(inode)) {
985987
ret = PTR_ERR(inode);

0 commit comments

Comments
 (0)