From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Kyoji Ogasawara <sawara04.o@gmail.com>, Qu Wenruo <wqu@suse.com>,
josef Bacik <josjosef@toxicpanda.com>
Cc: clm@fb.com, josef@toxicpanda.com, dsterba@suse.com,
linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 1/2] btrfs: Raise nobarrier log level to warn
Date: Mon, 26 May 2025 14:24:54 +0930 [thread overview]
Message-ID: <3ba600aa-5a79-4fe1-9b24-a45c0a58965e@gmx.com> (raw)
In-Reply-To: <CAKNDObB25gQHWQEHQCQ1J6SOCY3KPH9VEpDdPjicvEveF8s+vA@mail.gmail.com>
在 2025/5/26 03:15, Kyoji Ogasawara 写道:
> Sorry for sending piecemeal updates.
>
> I've realized that if the log goes into btrfs_emit_options(), it'll
> only show up during remount operations.
>
> So, I was thinking of adding the following code to open_ctree(), right
> after the btrfs_check_options() call.
>
> if (btrfs_test_opt(fs_info, NOBARRIER))
> btrfs_info(fs_info, "turning off barriers, use with care");
>
> What do you think of this approach?
>
> We could also set the log level to warning if that's preferred.
It turns out to be a more deeply involved bug.
The root cause is, we no longer use btrfs_parse_options() to output the
mount option changes.
Before the fsconfig change, we have btrfs_parse_options() function,
which will output an info line for each triggered option.
That function is utilized by both mount (open_ctree()) and remount
(btrfs_remount())
But with the fsconfig migration, we use parse_param() helper, which now
only handles the feature setting, no more messaging.
And btrfs_emit_options() to emit the message line.
The btrfs_emit_options() can handle empty @old context, thus it is
designed to handle both mount and remount.
Unfortunately at mount time we do not call btrfs_emit_options(), this
means we lost all the previous mount messages.
I'm not sure if this is intended or not, the fact we didn't notice the
change until now means, most of the info lines are not that useful and
no one is really noticing them.
So @josef, is it intended to skip all the mount option related info
messages? Or it's just a bug?
Thanks,
Qu
next prev parent reply other threads:[~2025-05-26 4:55 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-21 3:27 [PATCH 0/2] btrfs: Improve logging for barrier-related operation sawara04.o
2025-05-21 3:27 ` [PATCH 1/2] btrfs: Raise nobarrier log level to warn sawara04.o
2025-05-21 4:13 ` Qu Wenruo
2025-05-24 2:21 ` Kyoji Ogasawara
2025-05-24 3:48 ` Qu Wenruo
2025-05-25 2:32 ` Kyoji Ogasawara
2025-05-25 17:45 ` Kyoji Ogasawara
2025-05-26 4:54 ` Qu Wenruo [this message]
2025-05-26 9:21 ` David Sterba
2025-06-11 17:06 ` Kyoji Ogasawara
2025-05-26 9:14 ` David Sterba
2025-05-21 3:27 ` [PATCH 2/2] btrfs: Fix incorrect log message related barrier sawara04.o
2025-05-21 4:15 ` Qu Wenruo
2025-05-24 2:00 ` Kyoji Ogasawara
2025-05-24 2:09 ` Qu Wenruo
2025-07-21 8:07 ` Kyoji Ogasawara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3ba600aa-5a79-4fe1-9b24-a45c0a58965e@gmx.com \
--to=quwenruo.btrfs@gmx.com \
--cc=clm@fb.com \
--cc=dsterba@suse.com \
--cc=josef@toxicpanda.com \
--cc=josjosef@toxicpanda.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=sawara04.o@gmail.com \
--cc=wqu@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox