From: "Darrick J. Wong" <djwong@kernel.org>
To: Carlos Maiolino <cem@kernel.org>
Cc: or10n-cli <muhammad.ahmed.27@hotmail.com>,
linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] agheader: remove inappropriate use of -ENOSYS
Date: Fri, 18 Jul 2025 08:12:33 -0700 [thread overview]
Message-ID: <20250718151233.GS2672049@frogsfrogsfrogs> (raw)
In-Reply-To: <rypeauv2sg6iljvklmsgmir6g242btpqv6l7yidvmyenptdsf3@cnumxkzug2mp>
On Fri, Jul 18, 2025 at 03:02:41PM +0200, Carlos Maiolino wrote:
> On Fri, Jul 18, 2025 at 05:43:24PM +0500, or10n-cli wrote:
> > From 8b4f1f86101f2bf47a90a56321259d32d7fe55eb Mon Sep 17 00:00:00 2001
> > From: or10n-cli <muhammad.ahmed.27@hotmail.com>
> > Date: Fri, 18 Jul 2025 16:24:10 +0500
> > Subject: [PATCH] agheader: remove inappropriate use of -ENOSYS
> >
> > The ENOSYS error code should only be used to indicate an invalid
> > system call number. Its usage in this context is misleading and
> > has been removed to align with kernel error code semantics.
> >
> > Signed-off-by: my.user <my.mail@hotmail.com>
> > ---
> > fs/xfs/scrub/agheader.c | 1 -
> > 1 file changed, 1 deletion(-)
> >
> > diff --git a/fs/xfs/scrub/agheader.c b/fs/xfs/scrub/agheader.c
> > index 303374df44bd..743e0584b75d 100644
> > --- a/fs/xfs/scrub/agheader.c
> > +++ b/fs/xfs/scrub/agheader.c
> > @@ -134,7 +134,6 @@ xchk_superblock(
> > */
> > switch (error) {
> > case -EINVAL: /* also -EWRONGFS */
> > - case -ENOSYS:
> > case -EFBIG:
> > error = -EFSCORRUPTED;
> > fallthrough;
> > --
>
> The comment right above what you changed says:
>
> /*
> * The superblock verifier can return several different error codes
> * if it thinks the superblock doesn't look right.
> .
> .
> */
>
> What you did is basically skipping superblock inode size validation,
> now scrub will assume it's consistent even if it's corrupted.
>
> Also. Please, go read Documentation/process/submitting-patches.rst
...and please don't send the same email to us four times in a row.
--D
prev parent reply other threads:[~2025-07-18 15:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <alkfwOHITuxAoSIlg-ZgfhzBV_BrXj2oC7-6qD_gksbVxsIsw9472FpW3FySIh9byZcQQUmcdojisYFr9gRuOg==@protonmail.internalid>
2025-07-18 12:43 ` [PATCH] agheader: remove inappropriate use of -ENOSYS or10n-cli
2025-07-18 13:02 ` Carlos Maiolino
2025-07-18 15:12 ` 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=20250718151233.GS2672049@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=cem@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=muhammad.ahmed.27@hotmail.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