Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp5745936rwb; Wed, 9 Aug 2023 08:35:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGvdX931kTyke1VbZc1BG79IfA6Tjx6SIXxBpGM6x3w83U3dFsrBFH9WW+KL7KiPA+2xbwG X-Received: by 2002:a17:902:ec86:b0:1b8:35fa:cdb6 with SMTP id x6-20020a170902ec8600b001b835facdb6mr3159006plg.13.1691595310099; Wed, 09 Aug 2023 08:35:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691595310; cv=none; d=google.com; s=arc-20160816; b=qe5/MoQQkMMAfYgLFJPYgYcPFunYvHFha9N+pK/P5V1iG/A0aUwK4FcQIUA4jSUh0G 4rFcSSKhmYLzygyd4R/QpWyOS9FANpSuuoUNRGI4fWvKk+GceNKOUnbTy/7B3/9mr2wV JZgp77wgstTicslMfIKI4ScGieLSxvmIjDYZamypCWTWNhLPnyAyjRb2D9i2/FsjRZbd 5qcrwretS1E/g9qCs2FkRRFPZHS5b4Xxr1WsPFs7p2XGA45E+SEaeOIVbTGH0hhA+RNj rz/B0JNDa+5LhlIHr7PzfBiyyGRaMCjIfRltC+H5On7CZxVEE7rzNgt9EVl5si2HAn9I tDwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from; bh=n+rsXI2XZjqw82NyhscIhGGRSfhirYdgtL98JxT/hV4=; fh=BxDmAGrO2riLTy4gxFYFkmJgAs06z+1J4YDub+VO3o4=; b=nmi1oiz1+BA7CxeOFaJKKOCKoRBOIiMyk2/BpdX/0tJ08hOYQJeiGzdLF9WxpcoMc6 UG4lKrWhQ084Urkd6cEOV39PUd9MgzDzda4YS2MsdknS3gypxJFiTfxGMFxBjNsnkYHL IuN6UvwqeXHRFX1mtqw99aR1wRKsL5qYSTMJiFOV4BDVRzMDu1txNJUAiUVy3Uw/EAOC 7Q1VKlawWMxclcwI27404+4VVjXms7ooXF8zYcLE/y+bdqlhsBU6PmSjJheCojYEz0ZC 1XO/cg0EIKC+kmN9PNrVlNJPJRUxltn6LA+TqnY5dmtiTylX0IsCZeWS2+ik06lqvSa3 3xwQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-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 y5-20020a17090322c500b001bc671d6d15si6370559plg.614.2023.08.09.08.34.46; Wed, 09 Aug 2023 08:35:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-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; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234330AbjHIOwQ (ORCPT + 99 others); Wed, 9 Aug 2023 10:52:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233448AbjHIOwP (ORCPT ); Wed, 9 Aug 2023 10:52:15 -0400 Received: from mail.parknet.co.jp (mail.parknet.co.jp [210.171.160.6]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7B2FD210D; Wed, 9 Aug 2023 07:52:14 -0700 (PDT) Received: from ibmpc.myhome.or.jp (server.parknet.ne.jp [210.171.168.39]) by mail.parknet.co.jp (Postfix) with ESMTPSA id 7D4BE2055FA3; Wed, 9 Aug 2023 23:52:13 +0900 (JST) Received: from devron.myhome.or.jp (foobar@devron.myhome.or.jp [192.168.0.3]) by ibmpc.myhome.or.jp (8.17.2/8.17.2/Debian-1) with ESMTPS id 379EqCN9218206 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 9 Aug 2023 23:52:13 +0900 Received: from devron.myhome.or.jp (foobar@localhost [127.0.0.1]) by devron.myhome.or.jp (8.17.2/8.17.2/Debian-1) with ESMTPS id 379EqCeg199482 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 9 Aug 2023 23:52:12 +0900 Received: (from hirofumi@localhost) by devron.myhome.or.jp (8.17.2/8.17.2/Submit) id 379EqA73199481; Wed, 9 Aug 2023 23:52:10 +0900 From: OGAWA Hirofumi To: Jeff Layton Cc: Alexander Viro , Christian Brauner , Eric Van Hensbergen , Latchesar Ionkov , Dominique Martinet , Christian Schoenebeck , David Howells , Marc Dionne , Chris Mason , Josef Bacik , David Sterba , Xiubo Li , Ilya Dryomov , Jan Harkes , coda@cs.cmu.edu, Tyler Hicks , Gao Xiang , Chao Yu , Yue Hu , Jeffle Xu , Namjae Jeon , Sungjong Seo , Jan Kara , "Theodore Ts'o" , Andreas Dilger , Jaegeuk Kim , Miklos Szeredi , Bob Peterson , Andreas Gruenbacher , Greg Kroah-Hartman , Tejun Heo , Trond Myklebust , Anna Schumaker , Konstantin Komarov , Mark Fasheh , Joel Becker , Joseph Qi , Mike Marshall , Martin Brandenburg , Luis Chamberlain , Kees Cook , Iurii Zaikin , Steve French , Paulo Alcantara , Ronnie Sahlberg , Shyam Prasad N , Tom Talpey , Sergey Senozhatsky , Richard Weinberger , Hans de Goede , Hugh Dickins , Andrew Morton , Amir Goldstein , "Darrick J. Wong" , Benjamin Coddington , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, v9fs@lists.linux.dev, linux-afs@lists.infradead.org, linux-btrfs@vger.kernel.org, ceph-devel@vger.kernel.org, codalist@telemann.coda.cs.cmu.edu, ecryptfs@vger.kernel.org, linux-erofs@lists.ozlabs.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, cluster-devel@redhat.com, linux-nfs@vger.kernel.org, ntfs3@lists.linux.dev, ocfs2-devel@lists.linux.dev, devel@lists.orangefs.org, linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, linux-mtd@lists.infradead.org, linux-mm@kvack.org, linux-unionfs@vger.kernel.org, linux-xfs@vger.kernel.org Subject: Re: [PATCH v7 05/13] fat: make fat_update_time get its own timestamp In-Reply-To: <874jl88ed1.fsf@mail.parknet.co.jp> (OGAWA Hirofumi's message of "Wed, 09 Aug 2023 23:44:26 +0900") References: <20230807-mgctime-v7-0-d1dec143a704@kernel.org> <20230807-mgctime-v7-5-d1dec143a704@kernel.org> <87msz08vc7.fsf@mail.parknet.co.jp> <52bead1d6a33fec89944b96e2ec20d1ea8747a9a.camel@kernel.org> <878rak8hia.fsf@mail.parknet.co.jp> <7edc9239f73022b9c2a1d3f4f946153f85f94739.camel@kernel.org> <874jl88ed1.fsf@mail.parknet.co.jp> Date: Wed, 09 Aug 2023 23:52:10 +0900 Message-ID: <87zg306zfp.fsf@mail.parknet.co.jp> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS 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-ext4@vger.kernel.org OGAWA Hirofumi writes: > Jeff Layton writes: > >> I'm a little confused too. Why do you believe this will break >> -o relatime handling? This patch changes two things: >> >> 1/ it has fat_update_time fetch its own timestamp (and ignore the "now" >> parameter). This is in line with the changes in patch #3 of this series, >> which explains the rationale for this in more detail. >> >> 2/ it changes fat_update_time to also update the i_version if any of >> S_CTIME|S_MTIME|S_VERSION are set. relatime is all about the S_ATIME, >> and it is specifically excluded from that set. >> >> The rationale for the second change is is also in patch #3, but >> basically, we can't guarantee that current_time hasn't changed since we >> last checked for inode_needs_update_time, so if any of >> S_CTIME/S_MTIME/S_VERSION have changed, then we need to assume that any >> of them may need to be changed and attempt to update all 3. >> >> That said, I think the logic in fat_update_time isn't quite right. I >> think want something like this on top of this patch to ensure that the >> S_CTIME and S_MTIME get updated, even if the flags only have S_VERSION >> set. >> >> Thoughts? > > I'm not talking about "relatime" at all, I'm always talking about > "lazytime". > > I_DIRTY_TIME delays to update on disk inode only if changed > timestamp. But you changed it to I_DIRTY_SYNC, i.e. always update on > disk inode by timestamp. And if change like it, why doesn't same change goes to generic_update_time()? It looks like generic_update_time() in this series doesn't work like you said. -- OGAWA Hirofumi