public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Christian Brauner <brauner@kernel.org>
To: Jeff Layton <jlayton@kernel.org>
Cc: Theodore Ts'o <tytso@mit.edu>,
	Andreas Dilger <adilger.kernel@dilger.ca>,
	Jan Kara <jack@suse.cz>,
	linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-fsdevel@vger.kernel.org, Hugh Dickins <hughd@google.com>
Subject: Re: [PATCH v2] ext4: fix the time handling macros when ext4 is using small inodes
Date: Mon, 24 Jul 2023 10:34:58 +0200	[thread overview]
Message-ID: <20230724-waldlauf-hermelin-58df07b2e2dd@brauner> (raw)
In-Reply-To: <f541027cca189c42550136aab27b89889cd2fdd3.camel@kernel.org>

On Thu, Jul 20, 2023 at 10:54:16AM -0400, Jeff Layton wrote:
> On Thu, 2023-07-20 at 10:48 -0400, Theodore Ts'o wrote:
> > On Wed, Jul 19, 2023 at 06:32:19AM -0400, Jeff Layton wrote:
> > > If ext4 is using small on-disk inodes, then it may not be able to store
> > > fine grained timestamps. It also can't store the i_crtime at all in that
> > > case since that fully lives in the extended part of the inode.
> > > 
> > > 979492850abd got the EXT4_EINODE_{GET,SET}_XTIME macros wrong, and would
> > > still store the tv_sec field of the i_crtime into the raw_inode, even
> > > when they were small, corrupting adjacent memory.
> > > 
> > > This fixes those macros to skip setting anything in the raw_inode if the
> > > tv_sec field doesn't fit, and to properly return a {0,0} timestamp when
> > > the raw_inode doesn't support it.
> > > 
> > > Also, fix a bug in ctime handling during rename. It was updating the
> > > renamed inode's ctime twice rather than the old directory.
> > > 
> > > Cc: Jan Kara <jack@suse.cz>
> > > Fixes: 979492850abd ("ext4: convert to ctime accessor functions")
> > > Reported-by: Hugh Dickins <hughd@google.com>
> > > Tested-by: Hugh Dickins <hughd@google.com>
> > > Signed-off-by: Jeff Layton <jlayton@kernel.org>
> > 
> > Acked-by: Theodore Ts'o <tytso@mit.edu>
> > 
> > I assume this is will be applied to the vfs.ctime branch, yes?
> > 
> >   	      	      	 	    	- Ted
> 
> Yes. Ideally it'll be folded into the ext4 patch there.

Done now, thanks!

  reply	other threads:[~2023-07-24  8:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-19 10:32 [PATCH v2] ext4: fix the time handling macros when ext4 is using small inodes Jeff Layton
2023-07-20 14:48 ` Theodore Ts'o
2023-07-20 14:54   ` Jeff Layton
2023-07-24  8:34     ` Christian Brauner [this message]
2023-07-24  8:32 ` Christian Brauner

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=20230724-waldlauf-hermelin-58df07b2e2dd@brauner \
    --to=brauner@kernel.org \
    --cc=adilger.kernel@dilger.ca \
    --cc=hughd@google.com \
    --cc=jack@suse.cz \
    --cc=jlayton@kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@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