Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp30527068rwd; Thu, 6 Jul 2023 07:11:39 -0700 (PDT) X-Google-Smtp-Source: APBJJlEDRDd/x17UZAGZfayFD7spiwkK4mkn/UMNuNujtTOLuZ7rEnN4bOZjhEhzPDaGarttPQ0Q X-Received: by 2002:a05:6808:1302:b0:3a1:df16:2eed with SMTP id y2-20020a056808130200b003a1df162eedmr2429608oiv.30.1688652699505; Thu, 06 Jul 2023 07:11:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688652699; cv=none; d=google.com; s=arc-20160816; b=dd2Z5a/IGo42x2pdjhrHh3nkwuon3eUJjKvymatVI/yRxk0Z07uVnEH9nfmG5cbH0q b+PMe2nOUQa0cmo+EwmgYU5noLZTEeudjE0pFgFSBD4ZZt9OGpYFQmGb17ymnOsMySPp XO5QVnHHBrxFCONnwpOjp+Dudmdjtt9NNLnbC748ZhPyhozFrP6G6VgvNDxu6OPdP2Ik afWpdCNH1tFFQrRb9hJNaUAjFBSlWkWse3RptBPCV/aoSCMgjOWNO1Gc7HH1kR2kF4xH uTaOSIKUNVXtyjXJk+ahZp2qm+OD6sLfcbu4ZojsBrx4jbaC+9h0WdEvp2i45vl0lnnA 1Fdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=4YpAOh1KUc/8SwCmgMknakKRwe3WRAiEtk1nkMRs2RY=; fh=/aBFZ78sE5F+ABYdEpatL7ff9H3SvegzxhXV7XRwbcQ=; b=DJyHEC8QHuXCQbBAmDCjCmDhXB+PaHl6vgy9cdRV1b9d/jILh0N9SmkxopZta/rAns YztrpfErdOj1MdY+4vukHjiLTJs1CUIZ2wccQ5/d8UERPRiFeXF6n2w+omK71XAxeEUH tM55herUmnF0tGH0Z8zY9wkct+/CuZS2kO0UYje5jYpBKjHVBDPNI6pw5mjqcaHp9glk xDKgh6Cql9TOOn/K2RT3pzdeBBXZz7gEr2ILEbAUn5K9hH5+u1+hhtDqcv1/97CY4rKX 9LK181x7XjAzkaPLA3X0jG0/hVGqRMg2+KODD9SxqmCUjpS92PB7diZm1JSfGUQ+ulXV TgTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=qyTP93qG; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=zofd70NQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g15-20020a65594f000000b00553c2f85088si1425001pgu.888.2023.07.06.07.11.23; Thu, 06 Jul 2023 07:11:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=qyTP93qG; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=zofd70NQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232730AbjGFN67 (ORCPT + 99 others); Thu, 6 Jul 2023 09:58:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231959AbjGFN65 (ORCPT ); Thu, 6 Jul 2023 09:58:57 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7EF6419A0; Thu, 6 Jul 2023 06:58:54 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 310B41F747; Thu, 6 Jul 2023 13:58:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1688651933; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=4YpAOh1KUc/8SwCmgMknakKRwe3WRAiEtk1nkMRs2RY=; b=qyTP93qGh1511R28uAImof/+U+mdWEitBfzOWN1SsrqTH7AZsYFU7nczmOrph0mxOC5F16 YPyQeiSMXLcf5QosHHtNHIGcwpNRNzhzFd2dgFkxf4RfMnmm5VvIjq/0amIkfxZfK19Xnn Ya82sGG/IkybQDvI4gUUR5lfGVCAVks= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1688651933; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=4YpAOh1KUc/8SwCmgMknakKRwe3WRAiEtk1nkMRs2RY=; b=zofd70NQo0aI51QYn4w8ojAGBuX7s7Dq/MPZndgstrcT6gkGVOOVgAAwReaMHNSKPnpA1m 9HzpqmftfXmXoeCw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 0DF83138EE; Thu, 6 Jul 2023 13:58:53 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 77YwA53IpmSZZgAAMHmgww (envelope-from ); Thu, 06 Jul 2023 13:58:53 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id 72895A0707; Thu, 6 Jul 2023 15:58:52 +0200 (CEST) Date: Thu, 6 Jul 2023 15:58:52 +0200 From: Jan Kara To: Jeff Layton Cc: Christian Brauner , Miklos Szeredi , Amir Goldstein , Al Viro , Jan Kara , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-unionfs@vger.kernel.org Subject: Re: [PATCH v2 66/92] overlayfs: convert to ctime accessor functions Message-ID: <20230706135852.l2yu7xzffrhbctbb@quack3> References: <20230705185755.579053-1-jlayton@kernel.org> <20230705190309.579783-1-jlayton@kernel.org> <20230705190309.579783-64-jlayton@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230705190309.579783-64-jlayton@kernel.org> X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 05-07-23 15:01:31, Jeff Layton wrote: > In later patches, we're going to change how the inode's ctime field is > used. Switch to using accessor functions instead of raw accesses of > inode->i_ctime. > > Reviewed-by: Amir Goldstein > Signed-off-by: Jeff Layton ... > diff --git a/fs/overlayfs/file.c b/fs/overlayfs/file.c > index 21245b00722a..7acd3e3fe790 100644 > --- a/fs/overlayfs/file.c > +++ b/fs/overlayfs/file.c ... > @@ -249,10 +250,12 @@ static void ovl_file_accessed(struct file *file) > if (!upperinode) > return; > > + ctime = inode_get_ctime(inode); > + uctime = inode_get_ctime(upperinode); > if ((!timespec64_equal(&inode->i_mtime, &upperinode->i_mtime) || > - !timespec64_equal(&inode->i_ctime, &upperinode->i_ctime))) { > + !timespec64_equal(&ctime, &uctime))) { > inode->i_mtime = upperinode->i_mtime; > - inode->i_ctime = upperinode->i_ctime; > + inode_set_ctime_to_ts(inode, inode_get_ctime(upperinode)); I think you can use uctime here instead of inode_get_ctime(upperinode)? Otherwise the patch looks good. Feel free to add: Reviewed-by: Jan Kara Honza -- Jan Kara SUSE Labs, CR