From: Dave Chinner <david@fromorbit.com>
To: Jeff Layton <jlayton@kernel.org>
Cc: "Darrick J . Wong" <djwong@kernel.org>,
linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [RFC PATCH] xfs: don't bump the i_version on an atime update in xfs_vn_update_time
Date: Thu, 18 Aug 2022 11:35:48 +1000 [thread overview]
Message-ID: <20220818013548.GD3600936@dread.disaster.area> (raw)
In-Reply-To: <20220817130002.93592-1-jlayton@kernel.org>
On Wed, Aug 17, 2022 at 09:00:02AM -0400, Jeff Layton wrote:
> xfs will update the i_version when updating only the atime value, which
> is not desirable for any of the current consumers of i_version. Doing so
> leads to unnecessary cache invalidations on NFS and extra measurement
> activity in IMA.
>
> Add a new XFS_ILOG_NOIVER flag, and use that to indicate that the
> transaction should not update the i_version. Set that value in
> xfs_vn_update_time if we're only updating the atime.
>
> Signed-off-by: Jeff Layton <jlayton@kernel.org>
> ---
> fs/xfs/libxfs/xfs_log_format.h | 2 +-
> fs/xfs/libxfs/xfs_trans_inode.c | 2 +-
> fs/xfs/xfs_iops.c | 10 +++++++---
> 3 files changed, 9 insertions(+), 5 deletions(-)
>
> Dave,
>
> How about this for an alternate approach? This just explicitly ensures
> that we don't bump the i_version on an atime-only update, and seems to
> fix the testcase I have.
This just duplicates lazytime functionality, only now users
can't opt-in or out.
atime update filtering is a VFS function so behaviour is common
across all filesystems. Deficiencies in VFS filtering behaviour
should not be hacked around by individual filesystems, the VFS
filtering should be fixed.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
prev parent reply other threads:[~2022-08-18 1:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-17 13:00 [RFC PATCH] xfs: don't bump the i_version on an atime update in xfs_vn_update_time Jeff Layton
2022-08-18 0:04 ` Darrick J. Wong
2022-08-18 1:35 ` Dave Chinner [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=20220818013548.GD3600936@dread.disaster.area \
--to=david@fromorbit.com \
--cc=djwong@kernel.org \
--cc=jlayton@kernel.org \
--cc=linux-fsdevel@vger.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