Message ID | 20230929-xfs-iversion-v1-1-38587d7b5a52@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a561:0:b0:402:e146:ef86 with SMTP id g1csp4227478vqs; Fri, 29 Sep 2023 12:13:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGQXyjl8tc86wt7CpuKfKonBdJ7/vaKmwVgFHerRwiBOpns7fKJtgR+O1JDVCc8kzaaYVZ8 X-Received: by 2002:a17:90b:e91:b0:26f:392f:f901 with SMTP id fv17-20020a17090b0e9100b0026f392ff901mr8060110pjb.14.1696014822126; Fri, 29 Sep 2023 12:13:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696014822; cv=none; d=google.com; s=arc-20160816; b=HIrKPlSJ1x32RrbVUHeVFvA64vF2LbQlZAdrnvrueGHI8KbM3OrDSdUsqZwb91B5Mo vbXBR+aGOUhNesIthzWFlS8lN6cniVkT8EnxGlafKtxiWYZpWIDsh9LQjWmZSlJ3HhtG 6V9pNHVh0lDpB5Z/PZI8U7qE2icdHNFDCQVYNZwH6jOV3wcnaJCcIMKIg+vQlVDnwKNt ngk+8GO5lZwqUCf5R8gTEzcVOKZ50Oj1UH58oigGk8qRdHw+uKZhyj/xdG8rDLZqZYr/ 2P/KLjREI1BLU/Ov+SEJSiEX5NRM9KMwrZIgNTbNt9mWp5svlCQ7Kr0/KzV25pnjr7SO Vqsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:message-id:content-transfer-encoding :mime-version:subject:date:from:dkim-signature; bh=XEPW+TRYEcLB536JrnmtOaygBaHse0uOR+JIfOSES28=; fh=4McnFZoGInSbvTSlF9ecrp1NnEzsbXaw6epmzdRX/Gs=; b=kYynAZ452qXAcFr1/CgiCfBv7XWN2jAJBFlBKL8m6iXvkNRknFZjw3eD6eE3ZI80il RSA5TmNBSS9rcbI8Olf5R2iAgd57aWZ1juQkhLbP/SXvxdjq4pOdbOQcyBVPxGCM+UtM OeKQRvoXvnxg31HQatx4+rcAPyoX7ojyMZfrNcZl9L2j0Qe0yK8GG6YGaYWtFIL3lySl gUsIP9SiCIgCP9PNde7WrIK85g5oABw9qWZq1YXz1Nw3FM1VAHYyFA6YMxRA+Fjc6d7k dQij325sX9omt4ZIXL57OF1RexvChXyVKzKMGvLJsyI3x+IjRPTMNqcH5kQxpWj44Xk5 kzXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iy2Fa5Ef; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id gv17-20020a17090b11d100b0027762924984si1956308pjb.183.2023.09.29.12.13.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Sep 2023 12:13:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iy2Fa5Ef; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 53EF4801B82A; Fri, 29 Sep 2023 11:43:41 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233712AbjI2SnZ (ORCPT <rfc822;pwkd43@gmail.com> + 19 others); Fri, 29 Sep 2023 14:43:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233573AbjI2SnY (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 29 Sep 2023 14:43:24 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 327E6199; Fri, 29 Sep 2023 11:43:22 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2E2C3C433C8; Fri, 29 Sep 2023 18:43:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696013001; bh=dsAIvonzMBGLzOUuzBkDUFs/z3RCTJBFMlCcN4lg03s=; h=From:Date:Subject:To:Cc:From; b=iy2Fa5Efgr5pPH4MAeONdFF4TfQpVLHXnSpzz5R76+UxzerMvFibEqDjCSqjnCifL hkSxKGmzRTUaw7JLsKdW1NSrvgHA5Q6MDCJ4OJKCWt6pGsb2AG7nWJ9GUWv663GZUI SzCyEZLvXyBUCZnoT3oJHM9NDZ+8MQlkDofdQhYjkY8QAwS7a/VM6/XiODh5RMTUtE lXxfgQKyVL71XC2BgfkZx8mk5B1jMQHJMyLoSo259kU7Za29u7+PnRed/lv7ZJlxHa wwTvkHdJ9zfz4UfFVQgm93nRYKPqWSJY5TtcCOZ2Jn+Bt0v2sTu4M7Q2eNaevKmbeS M1Z4m8o7/pGQg== From: Jeff Layton <jlayton@kernel.org> Date: Fri, 29 Sep 2023 14:43:18 -0400 Subject: [PATCH] xfs: reinstate the old i_version counter as STATX_CHANGE_COOKIE MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230929-xfs-iversion-v1-1-38587d7b5a52@kernel.org> X-B4-Tracking: v=1; b=H4sIAMUaF2UC/x2MQQqAIBAAvyJ7bkGNQPtKdBBbay8WCiKIf886D sxMg0yJKcMqGiQqnPmOA9QkwF8unoR8DAYt9SyttlhDRi6UPhGNssFpr8xiFYzkSRS4/rtt7/0 FJgnIFV4AAAA= To: Chandan Babu R <chandan.babu@oracle.com>, "Darrick J. Wong" <djwong@kernel.org>, Chuck Lever <chuck.lever@oracle.com> Cc: linux-nfs@vger.kernel.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Jeff Layton <jlayton@kernel.org> X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=1452; i=jlayton@kernel.org; h=from:subject:message-id; bh=dsAIvonzMBGLzOUuzBkDUFs/z3RCTJBFMlCcN4lg03s=; b=owEBbQKS/ZANAwAIAQAOaEEZVoIVAcsmYgBlFxrIJqTwOBqvHLTbxU9WHv82mlhAnijBN26hv xEApTHGyYOJAjMEAAEIAB0WIQRLwNeyRHGyoYTq9dMADmhBGVaCFQUCZRcayAAKCRAADmhBGVaC FacDEACGYMZPWxXBQVmP5FluUddVXFbuLOvAXRerZfeMiOW3lubp4T9LRZEgMcHQTvkkGl7fIJu F8x9p41Gq+C9GdcSVCwC/EoA5vnxY6o6S4fhNFwSJfGdiMwDkgziyQHuo7s5U/jz9xplAWbUMMs CUBJxidfzuJRcPnPjy5QVQGly20SC2/qokGrBnUvZoMQSaj34ElcQlj+fS1hAYMgw0+3RYEZVsn Ih4aYguNISs/enGzJvz8ANjW4+Vn0uN9YR+z9kApnLo1MdbJXC7LCpc6RYQ10GjZKOErmNJx43g V2g1kQvYn0xTNBPXXkbQBo3Qz5HgMCp0Y4pXMIEtuIiy/qMA/yyJgV6RtTcRUGf+4pX9Jxj9tDi W9jZ/lofYb4ho6xnk6QXLsscpic3UFvLS4e9Tl9Oqp37GRsh/iv+daDfxP2Ft12FZKz6OsdkEPQ dKLYRQsNaQvKJLgw/dNMoOqXXHKK5udKm/Yfx3s7HVW3krQmhqZ4gXatgnzS1sIW+3rfjUR8e6a AqK4giVYHXTW90tJM1Wdr9xqaX2khY8lb1zoUb5s4W/1hSycKgtpY4X5gDQEnCHFV507/RQ6pti w8RKl9QVy6c7aEFmLHkDu9FFVd+X6A/dXcCEbm+wstOPEtUZsFGfsK9TkABK48+4ynzjUFOm8QS AH/+l+iQW3TOJ1w== X-Developer-Key: i=jlayton@kernel.org; a=openpgp; fpr=4BC0D7B24471B2A184EAF5D3000E684119568215 X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Fri, 29 Sep 2023 11:43:41 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778400438342933257 X-GMAIL-MSGID: 1778400438342933257 |
Series |
xfs: reinstate the old i_version counter as STATX_CHANGE_COOKIE
|
|
Commit Message
Jeff Layton
Sept. 29, 2023, 6:43 p.m. UTC
The handling of STATX_CHANGE_COOKIE was moved into generic_fillattr in
commit 0d72b92883c6 (fs: pass the request_mask to generic_fillattr), but
we didn't account for the fact that xfs doesn't call generic_fillattr at
all.
Make XFS report its i_version as the STATX_CHANGE_COOKIE.
Fixes: 0d72b92883c6 (fs: pass the request_mask to generic_fillattr)
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
I had hoped to fix this in a better way with the multigrain patches, but
it's taking longer than expected (if it even pans out at this point).
Until then, make sure we use XFS's i_version as the STATX_CHANGE_COOKIE,
even if it's bumped due to atime updates. Too many invalidations is
preferable to not enough.
---
fs/xfs/xfs_iops.c | 5 +++++
1 file changed, 5 insertions(+)
---
base-commit: df964ce9ef9fea10cf131bf6bad8658fde7956f6
change-id: 20230929-xfs-iversion-819fa2c18591
Best regards,
Comments
On Fri, 2023-09-29 at 14:43 -0400, Jeff Layton wrote: > The handling of STATX_CHANGE_COOKIE was moved into generic_fillattr in > commit 0d72b92883c6 (fs: pass the request_mask to generic_fillattr), but > we didn't account for the fact that xfs doesn't call generic_fillattr at > all. > > Make XFS report its i_version as the STATX_CHANGE_COOKIE. > > Fixes: 0d72b92883c6 (fs: pass the request_mask to generic_fillattr) > Signed-off-by: Jeff Layton <jlayton@kernel.org> > --- > I had hoped to fix this in a better way with the multigrain patches, but > it's taking longer than expected (if it even pans out at this point). > > Until then, make sure we use XFS's i_version as the STATX_CHANGE_COOKIE, > even if it's bumped due to atime updates. Too many invalidations is > preferable to not enough. > --- > fs/xfs/xfs_iops.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c > index 1c1e6171209d..2b3b05c28e9e 100644 > --- a/fs/xfs/xfs_iops.c > +++ b/fs/xfs/xfs_iops.c > @@ -584,6 +584,11 @@ xfs_vn_getattr( > } > } > > + if ((request_mask & STATX_CHANGE_COOKIE) && IS_I_VERSION(inode)) { > + stat->change_cookie = inode_query_iversion(inode); > + stat->result_mask |= STATX_CHANGE_COOKIE; > + } > + > /* > * Note: If you add another clause to set an attribute flag, please > * update attributes_mask below. > > --- > base-commit: df964ce9ef9fea10cf131bf6bad8658fde7956f6 > change-id: 20230929-xfs-iversion-819fa2c18591 > > Best regards, Ping? This patch is needed in v6.6 to prevent a regression when serving XFS via NFSD. I'd prefer this go in via the xfs tree, but let me know if you need me to get this merged this via a different one. Thanks,
On Wed, Oct 11, 2023 at 09:09:38AM -0400, Jeff Layton wrote: > On Fri, 2023-09-29 at 14:43 -0400, Jeff Layton wrote: > > The handling of STATX_CHANGE_COOKIE was moved into generic_fillattr in > > commit 0d72b92883c6 (fs: pass the request_mask to generic_fillattr), but > > we didn't account for the fact that xfs doesn't call generic_fillattr at > > all. > > > > Make XFS report its i_version as the STATX_CHANGE_COOKIE. > > > > Fixes: 0d72b92883c6 (fs: pass the request_mask to generic_fillattr) > > Signed-off-by: Jeff Layton <jlayton@kernel.org> > > --- > > I had hoped to fix this in a better way with the multigrain patches, but > > it's taking longer than expected (if it even pans out at this point). > > > > Until then, make sure we use XFS's i_version as the STATX_CHANGE_COOKIE, > > even if it's bumped due to atime updates. Too many invalidations is > > preferable to not enough. > > --- > > fs/xfs/xfs_iops.c | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c > > index 1c1e6171209d..2b3b05c28e9e 100644 > > --- a/fs/xfs/xfs_iops.c > > +++ b/fs/xfs/xfs_iops.c > > @@ -584,6 +584,11 @@ xfs_vn_getattr( > > } > > } > > > > + if ((request_mask & STATX_CHANGE_COOKIE) && IS_I_VERSION(inode)) { > > + stat->change_cookie = inode_query_iversion(inode); > > + stat->result_mask |= STATX_CHANGE_COOKIE; > > + } > > + > > /* > > * Note: If you add another clause to set an attribute flag, please > > * update attributes_mask below. > > > > --- > > base-commit: df964ce9ef9fea10cf131bf6bad8658fde7956f6 > > change-id: 20230929-xfs-iversion-819fa2c18591 > > > > Best regards, > > Ping? > > This patch is needed in v6.6 to prevent a regression when serving XFS > via NFSD. I'd prefer this go in via the xfs tree, but let me know if > you need me to get this merged this via a different one. Oh! Right, this is needed because the "hide a state in the high bit of tv_nsec" stuff got reverted in -rc3, correct? So now nfsd needs some way to know that something changed in the file, and better to have too many client invalidations than not enough? And I guess bumping i_version will keep nfsd sane for now? If the answers are [yes, yes, yes] then: Reviewed-by: Darrick J. Wong <djwong@kernel.org> --D > Thanks, > -- > Jeff Layton <jlayton@kernel.org>
On Wed, 2023-10-11 at 08:49 -0700, Darrick J. Wong wrote: > On Wed, Oct 11, 2023 at 09:09:38AM -0400, Jeff Layton wrote: > > On Fri, 2023-09-29 at 14:43 -0400, Jeff Layton wrote: > > > The handling of STATX_CHANGE_COOKIE was moved into generic_fillattr in > > > commit 0d72b92883c6 (fs: pass the request_mask to generic_fillattr), but > > > we didn't account for the fact that xfs doesn't call generic_fillattr at > > > all. > > > > > > Make XFS report its i_version as the STATX_CHANGE_COOKIE. > > > > > > Fixes: 0d72b92883c6 (fs: pass the request_mask to generic_fillattr) > > > Signed-off-by: Jeff Layton <jlayton@kernel.org> > > > --- > > > I had hoped to fix this in a better way with the multigrain patches, but > > > it's taking longer than expected (if it even pans out at this point). > > > > > > Until then, make sure we use XFS's i_version as the STATX_CHANGE_COOKIE, > > > even if it's bumped due to atime updates. Too many invalidations is > > > preferable to not enough. > > > --- > > > fs/xfs/xfs_iops.c | 5 +++++ > > > 1 file changed, 5 insertions(+) > > > > > > diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c > > > index 1c1e6171209d..2b3b05c28e9e 100644 > > > --- a/fs/xfs/xfs_iops.c > > > +++ b/fs/xfs/xfs_iops.c > > > @@ -584,6 +584,11 @@ xfs_vn_getattr( > > > } > > > } > > > > > > + if ((request_mask & STATX_CHANGE_COOKIE) && IS_I_VERSION(inode)) { > > > + stat->change_cookie = inode_query_iversion(inode); > > > + stat->result_mask |= STATX_CHANGE_COOKIE; > > > + } > > > + > > > /* > > > * Note: If you add another clause to set an attribute flag, please > > > * update attributes_mask below. > > > > > > --- > > > base-commit: df964ce9ef9fea10cf131bf6bad8658fde7956f6 > > > change-id: 20230929-xfs-iversion-819fa2c18591 > > > > > > Best regards, > > > > Ping? > > > > This patch is needed in v6.6 to prevent a regression when serving XFS > > via NFSD. I'd prefer this go in via the xfs tree, but let me know if > > you need me to get this merged this via a different one. > > Oh! Right, this is needed because the "hide a state in the high bit of > tv_nsec" stuff got reverted in -rc3, correct? So now nfsd needs some > way to know that something changed in the file, and better to have too > many client invalidations than not enough? And I guess bumping > i_version will keep nfsd sane for now? > > If the answers are [yes, yes, yes] then: > Reviewed-by: Darrick J. Wong <djwong@kernel.org> Yes, yes, and yes. Can you guys shepherd this into mainline? Thanks for the R-b!
On Wed, Oct 11, 2023 at 11:51:08AM -0400, Jeff Layton wrote: > On Wed, 2023-10-11 at 08:49 -0700, Darrick J. Wong wrote: > > On Wed, Oct 11, 2023 at 09:09:38AM -0400, Jeff Layton wrote: > > > On Fri, 2023-09-29 at 14:43 -0400, Jeff Layton wrote: > > > > The handling of STATX_CHANGE_COOKIE was moved into generic_fillattr in > > > > commit 0d72b92883c6 (fs: pass the request_mask to generic_fillattr), but > > > > we didn't account for the fact that xfs doesn't call generic_fillattr at > > > > all. > > > > > > > > Make XFS report its i_version as the STATX_CHANGE_COOKIE. > > > > > > > > Fixes: 0d72b92883c6 (fs: pass the request_mask to generic_fillattr) > > > > Signed-off-by: Jeff Layton <jlayton@kernel.org> > > > > --- > > > > I had hoped to fix this in a better way with the multigrain patches, but > > > > it's taking longer than expected (if it even pans out at this point). > > > > > > > > Until then, make sure we use XFS's i_version as the STATX_CHANGE_COOKIE, > > > > even if it's bumped due to atime updates. Too many invalidations is > > > > preferable to not enough. > > > > --- > > > > fs/xfs/xfs_iops.c | 5 +++++ > > > > 1 file changed, 5 insertions(+) > > > > > > > > diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c > > > > index 1c1e6171209d..2b3b05c28e9e 100644 > > > > --- a/fs/xfs/xfs_iops.c > > > > +++ b/fs/xfs/xfs_iops.c > > > > @@ -584,6 +584,11 @@ xfs_vn_getattr( > > > > } > > > > } > > > > > > > > + if ((request_mask & STATX_CHANGE_COOKIE) && IS_I_VERSION(inode)) { > > > > + stat->change_cookie = inode_query_iversion(inode); > > > > + stat->result_mask |= STATX_CHANGE_COOKIE; > > > > + } > > > > + > > > > /* > > > > * Note: If you add another clause to set an attribute flag, please > > > > * update attributes_mask below. > > > > > > > > --- > > > > base-commit: df964ce9ef9fea10cf131bf6bad8658fde7956f6 > > > > change-id: 20230929-xfs-iversion-819fa2c18591 > > > > > > > > Best regards, > > > > > > Ping? > > > > > > This patch is needed in v6.6 to prevent a regression when serving XFS > > > via NFSD. I'd prefer this go in via the xfs tree, but let me know if > > > you need me to get this merged this via a different one. > > > > Oh! Right, this is needed because the "hide a state in the high bit of > > tv_nsec" stuff got reverted in -rc3, correct? So now nfsd needs some > > way to know that something changed in the file, and better to have too > > many client invalidations than not enough? And I guess bumping > > i_version will keep nfsd sane for now? > > > > If the answers are [yes, yes, yes] then: > > Reviewed-by: Darrick J. Wong <djwong@kernel.org> > > Yes, yes, and yes. Can you guys shepherd this into mainline? Chandan, can you queue this (and the other xfs fixes I sent) for -rc6? --D > Thanks for the R-b! > -- > Jeff Layton <jlayton@kernel.org> >
On Wed, Oct 11, 2023 at 12:12:00 PM -0700, Darrick J. Wong wrote: > On Wed, Oct 11, 2023 at 11:51:08AM -0400, Jeff Layton wrote: >> On Wed, 2023-10-11 at 08:49 -0700, Darrick J. Wong wrote: >> > On Wed, Oct 11, 2023 at 09:09:38AM -0400, Jeff Layton wrote: >> > > On Fri, 2023-09-29 at 14:43 -0400, Jeff Layton wrote: >> > > > The handling of STATX_CHANGE_COOKIE was moved into generic_fillattr in >> > > > commit 0d72b92883c6 (fs: pass the request_mask to generic_fillattr), but >> > > > we didn't account for the fact that xfs doesn't call generic_fillattr at >> > > > all. >> > > > >> > > > Make XFS report its i_version as the STATX_CHANGE_COOKIE. >> > > > >> > > > Fixes: 0d72b92883c6 (fs: pass the request_mask to generic_fillattr) >> > > > Signed-off-by: Jeff Layton <jlayton@kernel.org> >> > > > --- >> > > > I had hoped to fix this in a better way with the multigrain patches, but >> > > > it's taking longer than expected (if it even pans out at this point). >> > > > >> > > > Until then, make sure we use XFS's i_version as the STATX_CHANGE_COOKIE, >> > > > even if it's bumped due to atime updates. Too many invalidations is >> > > > preferable to not enough. >> > > > --- >> > > > fs/xfs/xfs_iops.c | 5 +++++ >> > > > 1 file changed, 5 insertions(+) >> > > > >> > > > diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c >> > > > index 1c1e6171209d..2b3b05c28e9e 100644 >> > > > --- a/fs/xfs/xfs_iops.c >> > > > +++ b/fs/xfs/xfs_iops.c >> > > > @@ -584,6 +584,11 @@ xfs_vn_getattr( >> > > > } >> > > > } >> > > > >> > > > + if ((request_mask & STATX_CHANGE_COOKIE) && IS_I_VERSION(inode)) { >> > > > + stat->change_cookie = inode_query_iversion(inode); >> > > > + stat->result_mask |= STATX_CHANGE_COOKIE; >> > > > + } >> > > > + >> > > > /* >> > > > * Note: If you add another clause to set an attribute flag, please >> > > > * update attributes_mask below. >> > > > >> > > > --- >> > > > base-commit: df964ce9ef9fea10cf131bf6bad8658fde7956f6 >> > > > change-id: 20230929-xfs-iversion-819fa2c18591 >> > > > >> > > > Best regards, >> > > >> > > Ping? >> > > >> > > This patch is needed in v6.6 to prevent a regression when serving XFS >> > > via NFSD. I'd prefer this go in via the xfs tree, but let me know if >> > > you need me to get this merged this via a different one. >> > >> > Oh! Right, this is needed because the "hide a state in the high bit of >> > tv_nsec" stuff got reverted in -rc3, correct? So now nfsd needs some >> > way to know that something changed in the file, and better to have too >> > many client invalidations than not enough? And I guess bumping >> > i_version will keep nfsd sane for now? >> > >> > If the answers are [yes, yes, yes] then: >> > Reviewed-by: Darrick J. Wong <djwong@kernel.org> >> >> Yes, yes, and yes. Can you guys shepherd this into mainline? > > Chandan, can you queue this (and the other xfs fixes I sent) for -rc6? > I have pulled in your fixes and also the current patch. I will have to execute fstests for atleast one day before updating xfs-linux's for-next branch.
diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c index 1c1e6171209d..2b3b05c28e9e 100644 --- a/fs/xfs/xfs_iops.c +++ b/fs/xfs/xfs_iops.c @@ -584,6 +584,11 @@ xfs_vn_getattr( } } + if ((request_mask & STATX_CHANGE_COOKIE) && IS_I_VERSION(inode)) { + stat->change_cookie = inode_query_iversion(inode); + stat->result_mask |= STATX_CHANGE_COOKIE; + } + /* * Note: If you add another clause to set an attribute flag, please * update attributes_mask below.