public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Christian Brauner <brauner@kernel.org>
To: Jan Kara <jack@suse.cz>
Cc: Jeff Layton <jlayton@kernel.org>,
	tytso@mit.edu, adilger.kernel@dilger.ca,
	linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	Lukas Czerner <lczerner@redhat.com>
Subject: Re: [PATCH v2] ext4: fix i_version handling in ext4
Date: Thu, 18 Aug 2022 09:36:40 +0200	[thread overview]
Message-ID: <20220818073640.nxisir45whbcamtx@wittgenstein> (raw)
In-Reply-To: <20220817181903.3qqqzqvgghr2lqgm@quack3>

On Wed, Aug 17, 2022 at 08:19:03PM +0200, Jan Kara wrote:
> On Wed 17-08-22 12:26:38, 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 also
> > 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 time 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@redhat.com>
> > Cc: Christian Brauner <brauner@kernel.org>
> > Cc: Jan Kara <jack@suse.cz>
> > Signed-off-by: Jeff Layton <jlayton@kernel.org>
> 
> Hopefully all cases covered ;) Feel free to add:
> 
> Reviewed-by: Jan Kara <jack@suse.cz>

Thanks for making sure all cases are covered. :)
Reviewed-by: Christian Brauner (Microsoft) <brauner@kernel.org>

      reply	other threads:[~2022-08-18  7:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-17 16:26 [PATCH v2] ext4: fix i_version handling in ext4 Jeff Layton
2022-08-17 18:19 ` Jan Kara
2022-08-18  7:36   ` Christian Brauner [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=20220818073640.nxisir45whbcamtx@wittgenstein \
    --to=brauner@kernel.org \
    --cc=adilger.kernel@dilger.ca \
    --cc=jack@suse.cz \
    --cc=jlayton@kernel.org \
    --cc=lczerner@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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