From: "Darrick J. Wong" <djwong@kernel.org>
To: renlei1@chinatelecom.cn
Cc: linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] xfs: xfs_nfs_get_inode support zero generation
Date: Thu, 11 May 2023 16:22:06 -0700 [thread overview]
Message-ID: <20230511232206.GG858799@frogsfrogsfrogs> (raw)
In-Reply-To: <1683800241-14488-1-git-send-email-renlei1@chinatelecom.cn>
On Thu, May 11, 2023 at 06:17:21PM +0800, renlei1@chinatelecom.cn wrote:
> From: Ren Lei <renlei1@chinatelecom.cn>
>
> If generation is zero, bypass the verification of generation number
> to avoid stale file error. (Be consistent with other fs, such as
> ext4, fat, jfs, etc.)
What code is affected by the gen==0 handles being rejected? Is there a
user program or test case where this is required?
--D
> Signed-off-by: Ren Lei<renlei1@chinatelecom.cn>
> ---
> fs/xfs/xfs_export.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/xfs/xfs_export.c b/fs/xfs/xfs_export.c
> index 1064c2342876..cbee32c5ad37 100644
> --- a/fs/xfs/xfs_export.c
> +++ b/fs/xfs/xfs_export.c
> @@ -146,7 +146,7 @@ xfs_nfs_get_inode(
> return ERR_PTR(error);
> }
>
> - if (VFS_I(ip)->i_generation != generation) {
> + if (generation && VFS_I(ip)->i_generation != generation) {
> xfs_irele(ip);
> return ERR_PTR(-ESTALE);
> }
> --
> 2.27.0
>
next prev parent reply other threads:[~2023-05-11 23:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-11 10:17 [PATCH] xfs: xfs_nfs_get_inode support zero generation renlei1
2023-05-11 23:22 ` Darrick J. Wong [this message]
2023-05-12 2:00 ` Dave Chinner
[not found] ` <2023051210532845432129@chinatelecom.cn>
2023-05-12 3:31 ` Darrick J. Wong
2023-05-12 6:02 ` Dave Chinner
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=20230511232206.GG858799@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=renlei1@chinatelecom.cn \
/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