Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp30307419rwd; Thu, 6 Jul 2023 04:09:38 -0700 (PDT) X-Google-Smtp-Source: APBJJlGF0mKj/+utJDsKlAAVEx1AbNrTpGxDl6qiU4Wrp2+y4IOzHXzFMoR4LAONIJI0B7/pweMd X-Received: by 2002:a05:6a20:1591:b0:122:cb18:2e8c with SMTP id h17-20020a056a20159100b00122cb182e8cmr3055783pzj.6.1688641777957; Thu, 06 Jul 2023 04:09:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688641777; cv=none; d=google.com; s=arc-20160816; b=l/6wJFb2BFG54rnPZ/9Euav+/enJ22b4l4/yfXqaqsdnqq+FWiP9do12g/SxPzSZkm m6zl6kncDhUI2/xO8kMmqGBIToox/il+sImFTzf+vaaU6tf9amv1mtAKdGQUNQlc0rQb SV91Wmt8eYQwZfJ95GgPCNPk2b/GHg+O8k9vbzN1B/fSCRZpi4F8pfRYLoae71z/ikp4 uCWboxfJae+vwvmrNZd4X8RWATOWJvkRVvYyR7IggrwLXq6hmwpMER81nxGdgzBJwZk6 V3h4ykTFhTw6cuvHZZItqbxM79qNR7W3hm8lDHY6g9Tg6fiKmJa42uIzvgXDX1qnh9H6 QSKA== 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=ZjAHQzQEXBAzR1upFSNRvl8gRyeGbDUTwY9wKOloKgE=; fh=JKeKbBkYaOCdGczAjPxVAK+cb0dAQigB+hBR2DXVXfQ=; b=BNCfepQA1o9GQ5oMjyyYnDPAXL8QmMPBXJTTsR6AAiGsmlvvHSB5uqS41jFJSGauc3 WyXbcpJfFaOXo7eOz4+N72TfwrGZw93tS3K5NCIidAtXk0yHwT3xKAvQuNqwbG/G7rnA QxY6BMO28FLy5UDQjIVj1DypDNp9EDmNOAlnTXFIvpCvFnhAV9pVjTUVOHxzO7YzhKEo 58qzW4ezSvjcdtB4TNWe//+S91k6SK1N+f5W2RcSUy3y9MOn15EnQoOcpyYODRnsHBo0 +S0IvY6kRA7b4rQDkZXh+rIf79KYCCPIf2pqR/vNI14ZfRQKsgqS+eGAt2YAC4Efdtlt AF4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=CWhrFcjA; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=EcM5kzcX; 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 a192-20020a6390c9000000b005347d6bd7eesi1286799pge.141.2023.07.06.04.09.24; Thu, 06 Jul 2023 04:09:37 -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=CWhrFcjA; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=EcM5kzcX; 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 S232341AbjGFKyg (ORCPT + 99 others); Thu, 6 Jul 2023 06:54:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232194AbjGFKyO (ORCPT ); Thu, 6 Jul 2023 06:54:14 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7ACE212C; Thu, 6 Jul 2023 03:53:48 -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-out1.suse.de (Postfix) with ESMTPS id 3367E21DBF; Thu, 6 Jul 2023 10:53:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1688640826; 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=ZjAHQzQEXBAzR1upFSNRvl8gRyeGbDUTwY9wKOloKgE=; b=CWhrFcjAtAdPM+hPm4NuypbzXrxFmwxY+zfESBHWW6399J6Jse2UugUhnsjaBcI/tAANYS 2x68Pss3q/xSZClX29KcvJcR8zVVwbMZHhBVbMzOpO15n8d3xtG7iiwjC7l4ztH2pzD+KW SbaxcPmFejmp0j52lAJWdH94Slnofq0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1688640826; 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=ZjAHQzQEXBAzR1upFSNRvl8gRyeGbDUTwY9wKOloKgE=; b=EcM5kzcX7+KL8yjZXY6iu/zZ38so+JANZAdG7FecAwBdnQE8davIS/Xz0spDkAt5AO8/kf yy6Xchn6z1+zURBw== 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 254B4138EE; Thu, 6 Jul 2023 10:53:46 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id lZ8NCTqdpmRZBAAAMHmgww (envelope-from ); Thu, 06 Jul 2023 10:53:46 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id B0D58A0707; Thu, 6 Jul 2023 12:53:45 +0200 (CEST) Date: Thu, 6 Jul 2023 12:53:45 +0200 From: Jan Kara To: Jeff Layton Cc: Christian Brauner , Xiubo Li , Ilya Dryomov , Al Viro , Jan Kara , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, ceph-devel@vger.kernel.org Subject: Re: [PATCH v2 30/92] ceph: convert to ctime accessor functions Message-ID: <20230706105345.cdoadx7hvb227vts@quack3> References: <20230705185755.579053-1-jlayton@kernel.org> <20230705190309.579783-1-jlayton@kernel.org> <20230705190309.579783-28-jlayton@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230705190309.579783-28-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:00:55, 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: Xiubo Li > Signed-off-by: Jeff Layton Just one nit below: > @@ -688,6 +688,7 @@ void ceph_fill_file_time(struct inode *inode, int issued, > struct timespec64 *mtime, struct timespec64 *atime) > { > struct ceph_inode_info *ci = ceph_inode(inode); > + struct timespec64 ictime = inode_get_ctime(inode); > int warn = 0; > > if (issued & (CEPH_CAP_FILE_EXCL| > @@ -696,11 +697,12 @@ void ceph_fill_file_time(struct inode *inode, int issued, > CEPH_CAP_AUTH_EXCL| > CEPH_CAP_XATTR_EXCL)) { > if (ci->i_version == 0 || > - timespec64_compare(ctime, &inode->i_ctime) > 0) { > + timespec64_compare(ctime, &ictime) > 0) { > dout("ctime %lld.%09ld -> %lld.%09ld inc w/ cap\n", > - inode->i_ctime.tv_sec, inode->i_ctime.tv_nsec, > + inode_get_ctime(inode).tv_sec, > + inode_get_ctime(inode).tv_nsec, I think here you can use ictime instead of inode_get_ctime(inode). Otherwise feel free to add: Reviewed-by: Jan Kara Honza -- Jan Kara SUSE Labs, CR