[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YzZE7PUB13cqSw1x@mit.edu>
Date: Thu, 29 Sep 2022 21:22:52 -0400
From: "Theodore Ts'o" <tytso@....edu>
To: Jeff Layton <jlayton@...nel.org>
Cc: adilger.kernel@...ger.ca, djwong@...nel.org, david@...morbit.com,
trondmy@...merspace.com, neilb@...e.de, viro@...iv.linux.org.uk,
zohar@...ux.ibm.com, xiubli@...hat.com, chuck.lever@...cle.com,
lczerner@...hat.com, jack@...e.cz, bfields@...ldses.org,
brauner@...nel.org, fweimer@...hat.com,
linux-btrfs@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org, ceph-devel@...r.kernel.org,
linux-ext4@...r.kernel.org, linux-nfs@...r.kernel.org,
linux-xfs@...r.kernel.org
Subject: Re: [PATCH v5 2/8] ext4: fix i_version handling in ext4
On Thu, Sep 08, 2022 at 01:24:42PM -0400, Jeff Layton wrote:
> ext4 currently updates the i_version counter when the atime is updated
> during a read. This is less than ideal as it can cause unnecessary cache
> invalidations with NFSv4 and unnecessary remeasurements for IMA.
>
> The increment in ext4_mark_iloc_dirty is also problematic since it can
> corrupt the i_version counter for ea_inodes. We aren't bumping the file
> times in ext4_mark_iloc_dirty, so changing the i_version there seems
> wrong, and is the cause of both problems.
>
> Remove that callsite and add increments to the setattr, setxattr and
> ioctl codepaths, at the same times that we update the ctime. The
> i_version bump that already happens during timestamp updates should take
> care of the rest.
>
> In ext4_move_extents, increment the i_version on both inodes, and also
> add in missing ctime updates.
>
> Cc: Lukas Czerner <lczerner@...hat.com>
> Reviewed-by: Jan Kara <jack@...e.cz>
> Reviewed-by: Christian Brauner (Microsoft) <brauner@...nel.org>
> Signed-off-by: Jeff Layton <jlayton@...nel.org>
Thanks, I've applied just this patch from this patch series. I made
some minor adjustments since we've already enabled the i_version
counter unconditionally via another patch series from Lukas.
- Ted
Powered by blists - more mailing lists