Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp30617728rwd; Thu, 6 Jul 2023 08:20:35 -0700 (PDT) X-Google-Smtp-Source: APBJJlFe74xGrPEF2aY/tAb9SzldEpuOue56OLYX4NRlzty7+2AKu7wyb50Uu2//zZX47fzYW2NP X-Received: by 2002:a05:6a20:c128:b0:12c:b10d:6940 with SMTP id bh40-20020a056a20c12800b0012cb10d6940mr1925956pzb.29.1688656834713; Thu, 06 Jul 2023 08:20:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688656834; cv=none; d=google.com; s=arc-20160816; b=Yn8jc1jdxmFQBoCW0VsRPNJro6AXOaGzrTUxJ0cG4CxAhB2+GBqA7I7GJTx7S6ZZWs PzVaJKHCiVAqvD6gP9Hhc5brSnHY9aCt3OtR4A4LLrpABIJonCgEqYeWiRcoZchG12hp eNJOFfaXL+WfFMxfAC+UCmcCwNSN4C02mXxc5A6e0SbbgikLKgv7F3T6Jf4iPQykpCMv hdz0t6OEaoqYiDqTCDrwBJpG9ZHmW+jVELdkbYRnWz03UXmEpcggzVjDmip05d7Nvx8E C/rGJwXE7FYbBQl8FqDvTM7RgSlU+O9dBAOg/g7IVJQNr0C2FFEJe171hs3AHk1VlTO2 /zoQ== 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=nDUsetCkqpDQUJVYGRErgZCuLwEHAuc+qzd91AAjCtc=; fh=kAtTBJUR2/JbtuHDOOTP5O6sHFRhwTTrinXAwQC3zFY=; b=reRsMMdJmkEuZqFGPf+9z/r0zmrwF4ysAT7B/o1XN/afOuoob+nd1ij7KokLLUL8vm o0sWphEfzVOEW7tN9N7bM4OczxIJfR0Fm6MKTneWl1vs3D6cQgN+DUMDuNnBZMdpeTUJ xpJWEqBeIWtV74wh6m/R5SGxquRQnGbAtMkRVspSefjBveN4wNFdUJjkQdNY8DFhSbZf KcJxi/E6pfVOCQA2KxhdAuLXuYUBpYbZ9Ppdx9++44pXIuFjDyDMHEqYdJeZplVv2lzP yqcLZ9SQV+OWHtCMzwAemoqbdX+Ikys4Cl4RnK5owb0OUwFVK+s76xSYtJGviSYQvpR/ KQqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b="1+8rm95/"; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=BC9KEnqu; 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 h32-20020a631220000000b005538cfa80e3si1607574pgl.310.2023.07.06.08.20.19; Thu, 06 Jul 2023 08:20:34 -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="1+8rm95/"; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=BC9KEnqu; 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 S233453AbjGFOxj (ORCPT + 99 others); Thu, 6 Jul 2023 10:53:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233719AbjGFOxQ (ORCPT ); Thu, 6 Jul 2023 10:53:16 -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 29E6A1FEB; Thu, 6 Jul 2023 07:53:00 -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 928F51FD65; Thu, 6 Jul 2023 14:52:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1688655179; 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=nDUsetCkqpDQUJVYGRErgZCuLwEHAuc+qzd91AAjCtc=; b=1+8rm95/EcbL2B8vzMHoMtMkfs790e2J3JpHpOixMenmgWsb/gcgn+sUZnVAZ0JW7aWVIO 9l8YE+DNR25F2CMefU4DgtkaImwWAV1f0M/phU8ScD6WejtiZmZPAINIXubqfig8DVcpGj tkIqH4B6D3wewtC4ruk8kEe7lISDVYU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1688655179; 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=nDUsetCkqpDQUJVYGRErgZCuLwEHAuc+qzd91AAjCtc=; b=BC9KEnqupiXOSykkXXP6u+dxL3w9LYMrN+PTifNhZB4fjuRyeGWxgLCwJk9o47MD45RrJU 6W2p6myuHGB6urCg== 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 84BDE138FC; Thu, 6 Jul 2023 14:52:59 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id /vRnIEvVpmR9AwAAMHmgww (envelope-from ); Thu, 06 Jul 2023 14:52:59 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id 07FE3A0707; Thu, 6 Jul 2023 16:52:59 +0200 (CEST) Date: Thu, 6 Jul 2023 16:52:59 +0200 From: Jan Kara To: Jeff Layton Cc: Christian Brauner , Damien Le Moal , Naohiro Aota , Johannes Thumshirn , Al Viro , Jan Kara , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 83/92] zonefs: convert to ctime accessor functions Message-ID: <20230706145259.mnvliyi3s6nmgyvr@quack3> References: <20230705185755.579053-1-jlayton@kernel.org> <20230705190309.579783-1-jlayton@kernel.org> <20230705190309.579783-81-jlayton@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230705190309.579783-81-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:48, 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. > > Acked-by: Damien Le Moal > Signed-off-by: Jeff Layton Looks good. Feel free to add: Reviewed-by: Jan Kara Honza > --- > fs/zonefs/super.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/fs/zonefs/super.c b/fs/zonefs/super.c > index bbe44a26a8e5..eaaa23cf6d93 100644 > --- a/fs/zonefs/super.c > +++ b/fs/zonefs/super.c > @@ -658,7 +658,8 @@ static struct inode *zonefs_get_file_inode(struct inode *dir, > > inode->i_ino = ino; > inode->i_mode = z->z_mode; > - inode->i_ctime = inode->i_mtime = inode->i_atime = dir->i_ctime; > + inode->i_mtime = inode->i_atime = inode_set_ctime_to_ts(inode, > + inode_get_ctime(dir)); > inode->i_uid = z->z_uid; > inode->i_gid = z->z_gid; > inode->i_size = z->z_wpoffset; > @@ -694,7 +695,8 @@ static struct inode *zonefs_get_zgroup_inode(struct super_block *sb, > inode->i_ino = ino; > inode_init_owner(&nop_mnt_idmap, inode, root, S_IFDIR | 0555); > inode->i_size = sbi->s_zgroup[ztype].g_nr_zones; > - inode->i_ctime = inode->i_mtime = inode->i_atime = root->i_ctime; > + inode->i_mtime = inode->i_atime = inode_set_ctime_to_ts(inode, > + inode_get_ctime(root)); > inode->i_private = &sbi->s_zgroup[ztype]; > set_nlink(inode, 2); > > @@ -1317,7 +1319,7 @@ static int zonefs_fill_super(struct super_block *sb, void *data, int silent) > > inode->i_ino = bdev_nr_zones(sb->s_bdev); > inode->i_mode = S_IFDIR | 0555; > - inode->i_ctime = inode->i_mtime = inode->i_atime = current_time(inode); > + inode->i_mtime = inode->i_atime = inode_set_ctime_current(inode); > inode->i_op = &zonefs_dir_inode_operations; > inode->i_fop = &zonefs_dir_operations; > inode->i_size = 2; > -- > 2.41.0 > -- Jan Kara SUSE Labs, CR