From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9F928C41513 for ; Mon, 24 Jul 2023 08:35:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231651AbjGXIfO (ORCPT ); Mon, 24 Jul 2023 04:35:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231204AbjGXIfM (ORCPT ); Mon, 24 Jul 2023 04:35:12 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35CA7E74; Mon, 24 Jul 2023 01:35:04 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 759B360FA1; Mon, 24 Jul 2023 08:35:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 21924C433C8; Mon, 24 Jul 2023 08:35:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690187702; bh=ne7tk1khFVWf1DrNJLr/0lBfX1iyufLPJA4BWhCI0Vk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pQ6+HgKz+Old8TWsdMEPMfR46/Pfclw6QcF5QLXXrtgFJ1n9Qe55q4GGtvL7jdlDY yjdvSTMxe/B11PYvPI+xWRpvtBWR/PKFHcnJxvHI/TSGa/4rOvcfNXfSBSN4uf0nEh qERnHsqM9r9XYcGqpvSlmquJrTg7wHWakxQqz7XsVhw1MgE2kAimibWFzipi8wMFn/ k0OSqInoXfdLxAboPkVx17ELO5GSZ+KotpQ95lbXxnbfCjJGaPepgv79zoGxnkQYdS K1wbtml35ihiuXINizioUS0h9raob1VYdu5ZirUsry9SiGvYK7mXCkXwNbHCi2Lb1/ 68p+JmQP+vdmw== Date: Mon, 24 Jul 2023 10:34:58 +0200 From: Christian Brauner To: Jeff Layton Cc: Theodore Ts'o , Andreas Dilger , Jan Kara , linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Hugh Dickins Subject: Re: [PATCH v2] ext4: fix the time handling macros when ext4 is using small inodes Message-ID: <20230724-waldlauf-hermelin-58df07b2e2dd@brauner> References: <20230719-ctime-v2-1-869825696d6d@kernel.org> <20230720144807.GC5764@mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.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 > > > Fixes: 979492850abd ("ext4: convert to ctime accessor functions") > > > Reported-by: Hugh Dickins > > > Tested-by: Hugh Dickins > > > Signed-off-by: Jeff Layton > > > > Acked-by: Theodore Ts'o > > > > 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!