From: "Darrick J. Wong" <djwong@kernel.org>
To: cem@kernel.org
Cc: aalbersh@redhat.com, linux-xfs@vger.kernel.org
Subject: Re: [RFC PATCH 2/2] fsr: Always print error messages from xfrog_defragrange()
Date: Tue, 20 Jan 2026 09:23:55 -0800 [thread overview]
Message-ID: <20260120172355.GP15551@frogsfrogsfrogs> (raw)
In-Reply-To: <20260119142724.284933-3-cem@kernel.org>
On Mon, Jan 19, 2026 at 03:26:51PM +0100, cem@kernel.org wrote:
> From: Carlos Maiolino <cem@kernel.org>
>
> Error messages when xfrog_defragrange() are only printed when
> verbose/debug flages are used.
>
> We had reports from users complaining it's hard to find out error
> messages in the middle of dozens of other informational messages.
>
> Particularly I think error messages are better to be printed
> independently of verbose/debug flags, so unconditionally print those.
>
> Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
That seems like a reasonable behavior to me. On some level these
errors probably ought to be printed to stderr instead of stdout, but
nothing else in packfile() seems to do that so maybe we just leave that
alone?
Anyway silently dropping "did not actually defrag the file" errors by
default seems counterintuitive so
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
--D
> ---
> fsr/xfs_fsr.c | 10 +++-------
> 1 file changed, 3 insertions(+), 7 deletions(-)
>
> diff --git a/fsr/xfs_fsr.c b/fsr/xfs_fsr.c
> index 8845ff172fcb..fadb53af062d 100644
> --- a/fsr/xfs_fsr.c
> +++ b/fsr/xfs_fsr.c
> @@ -1464,19 +1464,15 @@ packfile(
> case 0:
> break;
> case ENOTSUP:
> - if (vflag || dflag)
> - fsrprintf(_("%s: file type not supported\n"), fname);
> + fsrprintf(_("%s: file type not supported\n"), fname);
> break;
> case EFAULT:
> /* The file has changed since we started the copy */
> - if (vflag || dflag)
> - fsrprintf(_("%s: file modified defrag aborted\n"),
> - fname);
> + fsrprintf(_("%s: file modified defrag aborted\n"), fname);
> break;
> case EBUSY:
> /* Timestamp has changed or mmap'ed file */
> - if (vflag || dflag)
> - fsrprintf(_("%s: file busy\n"), fname);
> + fsrprintf(_("%s: file busy\n"), fname);
> break;
> default:
> fsrprintf(_("XFS_IOC_SWAPEXT failed: %s: %s\n"),
> --
> 2.52.0
>
>
prev parent reply other threads:[~2026-01-20 17:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-19 14:26 [RFC PATCH 0/2] Improve user experience with xfs_fsr cem
2026-01-19 14:26 ` [RFC PATCH 1/2] libfrog: make xfrog_defragrange return a positive valued cem
2026-01-20 17:20 ` Darrick J. Wong
2026-01-21 8:57 ` Carlos Maiolino
2026-01-21 17:42 ` Darrick J. Wong
2026-01-19 14:26 ` [RFC PATCH 2/2] fsr: Always print error messages from xfrog_defragrange() cem
2026-01-20 17:23 ` Darrick J. Wong [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=20260120172355.GP15551@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=aalbersh@redhat.com \
--cc=cem@kernel.org \
--cc=linux-xfs@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