From: "Darrick J. Wong" <djwong@kernel.org>
To: Guanghui Yang <3497809730@qq.com>
Cc: linux-xfs@vger.kernel.org, Carlos Maiolino <cem@kernel.org>,
Christoph Hellwig <hch@lst.de>,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] xfs: propagate errors from xfs_rtginode_load
Date: Sun, 12 Jul 2026 09:22:52 -0700 [thread overview]
Message-ID: <20260712162252.GA7233@frogsfrogsfrogs> (raw)
In-Reply-To: <tencent_542687AA9C474951C4132E84DAED17622105@qq.com>
On Sun, Jul 12, 2026 at 03:42:56AM +0000, Guanghui Yang wrote:
> xfs_rtginode_ensure() treats every xfs_rtginode_load() error other than
> -ENOENT as success. This can leave the realtime group inode unset after an
> I/O, allocation, or corruption error. Growfs then continues as though the
> inode had been loaded.
>
> Only -ENOENT means that the inode needs to be created. Return all other
> errors to the growfs caller.
>
> Fixes: ae897e0bed0f ("xfs: support creating per-RTG files in growfs")
> Cc: stable@vger.kernel.org
> Signed-off-by: Guanghui Yang <3497809730@qq.com>
Yeah, that's correct
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
--D
> ---
> fs/xfs/xfs_rtalloc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c
> index 7a3f97686989..84efe5a8fb11 100644
> --- a/fs/xfs/xfs_rtalloc.c
> +++ b/fs/xfs/xfs_rtalloc.c
> @@ -737,7 +737,7 @@ xfs_rtginode_ensure(
> xfs_trans_cancel(tp);
>
> if (error != -ENOENT)
> - return 0;
> + return error;
> return xfs_rtginode_create(rtg, type, true);
> }
>
> --
> 2.34.1
>
prev parent reply other threads:[~2026-07-12 16:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-12 3:42 [PATCH] xfs: propagate errors from xfs_rtginode_load Guanghui Yang
2026-07-12 16:22 ` 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=20260712162252.GA7233@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=3497809730@qq.com \
--cc=cem@kernel.org \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=stable@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