Skip to content

btrfs: restore mount option info messages during mount#2

Closed
ksawaray wants to merge 1 commit into
masterfrom
fix-output-log
Closed

btrfs: restore mount option info messages during mount#2
ksawaray wants to merge 1 commit into
masterfrom
fix-output-log

Conversation

@ksawaray

Copy link
Copy Markdown
Owner

No description provided.

@ksawaray ksawaray requested a review from Copilot July 21, 2025 17:50

This comment was marked as outdated.

@ksawaray

ksawaray commented Jul 25, 2025

Copy link
Copy Markdown
Owner Author

With the migration to fsconfig, mount option messages that were
previously output during mount operations were lost. The root cause
is that we no longer use btrfs_parse_options() to output mount option
changes.

While btrfs_emit_options() can handle empty @old context for both mount
and remount, it was only called during remount operations, causing the
loss of mount option messages during initial mount.

This patch restores mount option logging by calling btrfs_emit_options()
in btrfs_fill_super() after open_ctree() succeeds. To avoid duplicate
messages for auto-detected features like free-space-tree and space-cache,
those specific log outputs are removed.

@ksawaray ksawaray requested a review from Copilot July 25, 2025 07:47

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds logging functionality to the btrfs filesystem mount process by calling btrfs_emit_options during mount and removes duplicate log entries from the function.

  • Adds a call to btrfs_emit_options in the btrfs_fill_super function to log mount options during filesystem mounting
  • Removes duplicate logging statements for NODATASUM, FREE_SPACE_TREE, and SPACE_CACHE options
  • Adds forward declaration for the btrfs_emit_options function

Comment thread fs/btrfs/super.c
After the fsconfig migration, 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")
@ksawaray ksawaray changed the title btrfs: Add log output when mounting btrfs: restore mount option info messages during mount Jul 25, 2025
@ksawaray

Copy link
Copy Markdown
Owner Author

Fix as #4

@ksawaray ksawaray closed this Aug 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants