From: Boris Burkov <boris@bur.io>
To: David Sterba <dsterba@suse.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: qgroup: update rescan message levels and error codes
Date: Wed, 8 May 2024 08:34:59 -0700 [thread overview]
Message-ID: <20240508153459.GA372255@zen.localdomain> (raw)
In-Reply-To: <20240502204558.16824-1-dsterba@suse.com>
On Thu, May 02, 2024 at 10:45:58PM +0200, David Sterba wrote:
> On filesystems without enabled quotas there's still a warning message in
> the logs when rescan is called. In that case it's not a problem that
> should be reported, rescan can be called unconditionally and leads.
> Change the error code to ENOTCONN which is used for 'quotas not enabled'
> elsewhere.
>
> Remove message (also a warning) when rescan is called during an ongoing
> rescan, this brings no useful information and the error code is
> sufficient.
>
> Change message levels to debug for now, they can be removed eventually.
>
> Signed-off-by: David Sterba <dsterba@suse.com>
Reviewed-by: Boris Burkov <boris@bur.io>
> ---
> fs/btrfs/qgroup.c | 12 +++++-------
> 1 file changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c
> index 1768fc6f232f..4714644daa78 100644
> --- a/fs/btrfs/qgroup.c
> +++ b/fs/btrfs/qgroup.c
> @@ -3820,14 +3820,14 @@ qgroup_rescan_init(struct btrfs_fs_info *fs_info, u64 progress_objectid,
> /* we're resuming qgroup rescan at mount time */
> if (!(fs_info->qgroup_flags &
> BTRFS_QGROUP_STATUS_FLAG_RESCAN)) {
> - btrfs_warn(fs_info,
> + btrfs_debug(fs_info,
> "qgroup rescan init failed, qgroup rescan is not queued");
> ret = -EINVAL;
> } else if (!(fs_info->qgroup_flags &
> BTRFS_QGROUP_STATUS_FLAG_ON)) {
> - btrfs_warn(fs_info,
> + btrfs_debug(fs_info,
> "qgroup rescan init failed, qgroup is not enabled");
> - ret = -EINVAL;
> + ret = -ENOTCONN;
> }
>
> if (ret)
> @@ -3838,14 +3838,12 @@ qgroup_rescan_init(struct btrfs_fs_info *fs_info, u64 progress_objectid,
>
> if (init_flags) {
> if (fs_info->qgroup_flags & BTRFS_QGROUP_STATUS_FLAG_RESCAN) {
> - btrfs_warn(fs_info,
> - "qgroup rescan is already in progress");
> ret = -EINPROGRESS;
> } else if (!(fs_info->qgroup_flags &
> BTRFS_QGROUP_STATUS_FLAG_ON)) {
> - btrfs_warn(fs_info,
> + btrfs_debug(fs_info,
> "qgroup rescan init failed, qgroup is not enabled");
> - ret = -EINVAL;
> + ret = -ENOTCONN;
> } else if (btrfs_qgroup_mode(fs_info) == BTRFS_QGROUP_MODE_DISABLED) {
> /* Quota disable is in progress */
> ret = -EBUSY;
> --
> 2.44.0
>
prev parent reply other threads:[~2024-05-08 15:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-02 20:45 [PATCH] btrfs: qgroup: update rescan message levels and error codes David Sterba
2024-05-08 15:34 ` Boris Burkov [this message]
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=20240508153459.GA372255@zen.localdomain \
--to=boris@bur.io \
--cc=dsterba@suse.com \
--cc=linux-btrfs@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).